Matthias Clasen [Fri, 30 Nov 2012 03:06:18 +0000 (22:06 -0500)]
Don't check the same crossing mode twice
This was broken since commit b2aaa94 in 2008. Its commit message
clearly states that the intention was to check for GTK_GRAB,
GTK_UNGRAB and STATE_CHANGED. Lets do that, then.
Alan McGovern [Fri, 23 Nov 2012 20:38:34 +0000 (15:38 -0500)]
Fix broken function pointer declarations on windows
Both flashing a window and setting the window opacity were using
incorrect declarations for function pointers. They were missing the
WINAPI annotation as defined in windows.h. As a result, the stack
could be corrupted when these functions were invoked.
Sanitize memory handling in cups_request_printer_list_cb
gtk+ was trying to display already freed strings, leaking memory,
...I noticed this because I was getting weird blinking characters
as the status of my cups printers, and valgrind confirmed something
was wrong.
Benjamin Otte [Sun, 25 Nov 2012 14:31:59 +0000 (15:31 +0100)]
cssvalue: Add _gtk_css_initial_value_get()
... so we don't bump a refcount whenever we get the initial singleton.
We want to use this function instead of
_gtk_css_style_property_get_initial_value() everywhere where we compute
values, because some initial values may depend on settings soon.
Benjamin Otte [Sun, 25 Nov 2012 03:41:49 +0000 (04:41 +0100)]
widget: Remove an unneeded queue_resize()
Resizes are queued via
gtk_widget_propagate_state()
=> gtk_style_context_set_state()
=> gtk_style_context_queue_invalidate()
=> gtk_style_context_validate()
=> _gtk_widget_style_context_invalidated()
so there's no need to queue an extra one.
Benjamin Otte [Sun, 25 Nov 2012 02:34:08 +0000 (03:34 +0100)]
symboliccolor: Deprecate
Symbolic colors are an implementation detail of the CSS engine and have
been superceded by GtkCssColorValue. We don't want them clobbering the
public API. In particular because the only use I could find in the
public API is people using it to shade colors.
The documentation for gtk_file_chooser_get_filenames() states that the
returned filenames are absolute paths, and uses g_file_get_path() to
construct the filename. The same function is used to construct the
filename in gtk_file_chooser_get_filename(), so it should also return
absolute paths.
Michael Natterer [Thu, 22 Nov 2012 12:37:58 +0000 (13:37 +0100)]
gtk: don't let insensitive children eat scroll events when bubbling down
When event capturing is enabled, stop propagating scroll events
at insensitive widgets, but don't handle them (don't return TRUE),
so they can bubble up again and reach their handling widgets.
Camillo Lugaresi [Tue, 20 Nov 2012 08:52:39 +0000 (02:52 -0600)]
Bug 688710 - splashscreen shouldn't be always on top on OS X
Activate the "hides on deactivate" behavior for splashscreens,
torn-off menus, utility windows, tooltips and notifications: when
another application is brought to the front, these windows are hidden
so as not to obscure it. This is the expected behavior for
application-specific floating windows on OS X.
(cherry picked from commit 0596f5591f36f57b99103914ba03abbed5765e8b)
Michael Natterer [Tue, 20 Nov 2012 18:10:06 +0000 (19:10 +0100)]
quartz: fix the mapping of GDK_KP_Enter in known_numeric_keys[]
so it will actually be used, instead of delivering GDK_Return
when it should be GDK_KP_Enter.
(cherry picked from commit 27f3fcf12c39d551532872cf26823993c93eb04d)
Benjamin Otte [Tue, 20 Nov 2012 11:21:03 +0000 (12:21 +0100)]
reftests: Fix linear-gradient reftest (again)
Make it so that the repeating vs normal test only uses sharp color
cutoffs instead of real gradients. That removes rounding errors and
makes the test pass.
so GtkMenu works properly. This is not right, but not more
wrong than always sending GDK_NOTIFY_ANCESTOR either.
(cherry picked from commit 35a9322e45bb403d34c9e4da036d9d8d559419fb)
Michael Natterer [Tue, 20 Nov 2012 09:28:58 +0000 (10:28 +0100)]
Bug 672193 - windows (including menus) shown multiple times don't...
Based on a patch from Paul Davis, inject synthetic enter events directly
into the Quartz event stream, instead of trying to synthesize them in GDK.
This seems to magically fix most combo box popup weirdness, I guess
some code is relying on a specfic order of events, or any other state
imposed by the "proper" code path of events coming in the usual way.
The patch also removes _gdk_quartz_events_send_enter_notify_event()
which is now obsolete.
(sortof cherry-pixked from 979e5061a040f8896f505ffbd230f52af2d61ded
but needed manual editing because GdkQuartzWindow.c was renamed
and apparently earlier patches not picked correctly/completely)
Michael Natterer [Sun, 18 Nov 2012 16:42:31 +0000 (17:42 +0100)]
quartz: move tooltips window to the topmost level
so they can appear on top of popup menus. Also, reorder the switch()
statement in window_type_hint_to_level() so it resembles the stacking
order, to avoid confision like this in the future. Fixes bug 688512.
(cherry picked from commit 1a2509a6ab7f35caae758c2b31f40ef90d4fa94a)
Michael Natterer [Thu, 15 Nov 2012 10:34:15 +0000 (11:34 +0100)]
quartz: filter out button press events on the window frame
Don't try to handle button press events on the window frame, they
have out-of-window coordinates. Also, break grabs on such events
so popup menus go away.
Patch from Kristian Rietveld, fixes bug 684419.
(cherry picked from commit 43e1354b71640d3fb7a47b997a436dc65bbd922f)
Benjamin Otte [Wed, 14 Nov 2012 18:35:47 +0000 (19:35 +0100)]
Revert parts of "window: Remove useless functions"
This reverts the size_allocate removal from commit 8449e05865b42a8c78b96f809b280aa5a4f044d8. That code was using
_gtk_window_set_allocation() instead of gtk_widget_set_allocation(). And
that broke glade.
Benjamin Otte [Wed, 14 Nov 2012 13:03:47 +0000 (14:03 +0100)]
sizerequest: Optimize CONSTANT_SIZE better
We can set for_size to -1 earlier than we did. Doing so makes sure we
only cache one value (as we should in the first place). In GTK 3.6, this
worked properly, but with Previously, this check was moved further up to
avoid interacting with size groups. But after recent refactorings, size
groups are handled way earlier anyway.
Benjamin Otte [Wed, 14 Nov 2012 00:25:21 +0000 (01:25 +0100)]
sizerequest: Use GtkOrientation
... instead of GtkSizeGroupMode. Orientation is what we're interested in
after all. When we need a GtkSizeGroupMode, we can do the translation
where we need it.
Michael Natterer [Tue, 13 Nov 2012 18:58:40 +0000 (19:58 +0100)]
quartz: move SPLASHSCREEN-hinted windows to NSStatusWindowLevel
which does not really have a different effect than the previously
used NSPopUpMenuWindowLevel, but is what all code examples I found
are using, and it does make more sense.
(cherry picked from commit 47f0e3f1e1cd6b0ae61ec7ced48cc9802f1a95a4)
Timothy Arceri [Wed, 31 Oct 2012 11:05:48 +0000 (22:05 +1100)]
Remove bookmark duplicate of shortcut
Application code can set shortcut folders that are already bookmarks.
This code causes the bookmarks to be refreshed after the shortcut is
added removing any possible bookmark duplicates
Mike Gorse [Sun, 11 Nov 2012 17:00:49 +0000 (11:00 -0600)]
Add accessibles for GtkEntry icons
Expose GtkEntry icons as child accessibles of a GtkEntry, and provide
actions to simulate clicking them. Also, refactor the a11y children test
slightly to add a test.