Cosimo Cecchi [Tue, 17 Jan 2012 22:14:23 +0000 (17:14 -0500)]
button: don't be active when holding the mouse button outside the bounds
GtkButton currently draws itself as active (pressed down) in case we're
pressing and holding the mouse pointer outside its bounds; this is
misleading though, since we won't activate the button unless the mouse
is released inside the button itself.
Fix this by only setting the ACTIVE state flag when the button is
actually pressed down.
My previous fix for this broke the progress bar in epiphany. This fix
makes it work again, and keeps the gimp bug fixed.
Basically, whenever we do a non-double-buffered rendering we have to
flush the entire window as it might be drawn outside the double
buffering machinery.
Cosimo Cecchi [Fri, 3 Feb 2012 20:33:30 +0000 (15:33 -0500)]
overlay: add left/right/top/bottom style classes to overlay children
When we're allocating children of GtkOverlay, compare their allocation
with the overlay one, and set left/right/top/bottom style classes if the
overlaid widget touches one or more of the overlay edges.
Cosimo Cecchi [Wed, 29 Feb 2012 17:21:59 +0000 (12:21 -0500)]
overlay: do not to set uninitialized values in the main allocation
gtk_widget_translate_coordinates() can fail in case the widget is not
realized or there's no common ancestor. Don't use the x/y values
returned by that method in that case, since their value is undefined.
Cosimo Cecchi [Tue, 28 Feb 2012 20:04:31 +0000 (15:04 -0500)]
cellrendereraccel: override get_preferred_width, not get_size
Since GtkCellRendererText moved to WFH requests, our get_size
implementation is ignored. We should override get_preferred_width
instead. This fixes the accel renderer being clipped to a wrong size
when trying to edit its shortcut.
Rob Bradford [Mon, 27 Feb 2012 14:30:58 +0000 (14:30 +0000)]
wayland: Categorise menus, popups and combo boxes as Wayland popup windows
Once we've made them popup windows we must also implement the popup_done event
handler on the shell surface listener. The best we can currently do is to hide
the window. This will then signal up to GTK which could then deactivate the
appropriate menu (see https://bugzilla.gnome.org/show_bug.cgi?id=670881)
Rob Bradford [Mon, 27 Feb 2012 14:06:22 +0000 (14:06 +0000)]
wayland: Store the device that does a grab for a window on the window
This allows us to get the device if we need to make the window a popup. This
relies on the side effect that GTK calls into GDK to take a grab before the
popup window is shown.
Cosimo Cecchi [Mon, 27 Feb 2012 16:45:12 +0000 (11:45 -0500)]
gdk: don't install gdkversionmacros.h twice
Since it's generated, we install the header by putting it into
gdkinclude_HEADERS, so it's wrong to put it again into
gdk_public_h_sources.
This fixes the build.
Matthias Clasen [Mon, 27 Feb 2012 12:10:59 +0000 (07:10 -0500)]
gtk: Use versioned deprecations
This patch changes all uses of GDK_DEPRECATED(_FOR) in gtk headers
by the versioned variants, GDK_DEPRECATED_IN_3_x(_FOR). At the same
time, we add GDK_AVAILABLE_IN_3_x annotations for all API additions
in 3.2 and 3.4.
Matthias Clasen [Mon, 27 Feb 2012 12:07:48 +0000 (07:07 -0500)]
gdk: Use versioned deprecations
This patch changes all uses of GDK_DEPRECATED(_FOR) in gdk headers
by the versioned variants, GDK_DEPRECATED_IN_3_x(_FOR). At the same
time, we add GDK_AVAILABLE_IN_3_x annotations for all API additions
in 3.2 and 3.4.
Matthias Clasen [Mon, 27 Feb 2012 12:04:30 +0000 (07:04 -0500)]
Add versioned deprecation macros
These macros follow the recent changes in GLibs deprecation
setup. We now annotate deprecated functions with the version
they were deprecated in, and you can define the macro
GDK_VERSION_MIN_REQUIRED to cut off deprecation warnings for
'recent' deprecations.
At the same time, we introduce version annotations for new API
and allow you to avoid 'recent' API additions by defining
GDK_VERSION_MAX_ALLOWED.
Paolo Borelli [Tue, 21 Feb 2012 22:42:39 +0000 (23:42 +0100)]
Set infobar css classes permanently
The message-type css classes must be in the widget context all the time,
not only when drawing, otherwise they are not propagated to the
children, for instance a label in the InfoBar must inherit the
color. Add a corresponding reftest.
Carlos Garnacho [Thu, 12 Jan 2012 02:05:54 +0000 (03:05 +0100)]
textview: Set background on the widget's window
The widget window is usually covered by the bin_window.
Its background color will become relevant when we introduce
kinetic scrolling with overshooting.
Carlos Garnacho [Thu, 12 Jan 2012 02:02:55 +0000 (03:02 +0100)]
iconview: Set background on the widget's window
The widget window is usually covered by the bin_window.
Its background color will become relevant when we introduce
kinetic scrolling with overshooting.
Carlos Garnacho [Thu, 12 Jan 2012 02:00:45 +0000 (03:00 +0100)]
treeview: Set background on the widget's window
The widget window is usually covered by the bin_window.
Its background color will become relevant when we introduce
kinetic scrolling with overshooting.
Carlos Garnacho [Tue, 6 Dec 2011 19:20:39 +0000 (20:20 +0100)]
gtk: Only set widget under device on non-virtual crossing events
_gtk_widget_set_device_window() is suppose to make accounting of
the topmost widget under the device at each time, so avoid setting
it on virtual crossing events as the device is already in another
window.
Carlos Garnacho [Wed, 4 Jan 2012 23:27:57 +0000 (00:27 +0100)]
range: Don't perform a GTK+ grab
The implicit grab on priv->event_window already warrants that this
widget is the only one getting events while the button is pressed,
so avoid the extra GTK+ grab here.
Carlos Garnacho [Sat, 3 Dec 2011 14:04:19 +0000 (15:04 +0100)]
gdk: Keep track of the last slave device used
This last slave device (stored per master) is used to fill
in the missing slave device in synthesized crossing events
that are not directly caused by a device event (ie due to
configure events or grabs).
Carlos Garnacho [Tue, 1 Nov 2011 01:54:03 +0000 (02:54 +0100)]
entry: Handle ::grab-notify
Store the device, and unset private fields whenever the device
is shadowed by another GTK+ grab, so popping up menus while
selecting (i.e. press-and-hold) doesn't leave the entry in a
confused state.
* Restores the old padding
* Prelight on spin buttons
* Don't have a generic prelight background selector, as that got
picked up by things like images that should have a transparent bg.
Michael Natterer [Thu, 23 Feb 2012 12:27:09 +0000 (13:27 +0100)]
quartz: make function keys work (again?)
The F keys have no unicode mapping, and UCKeyTranslate() returns
a bogus 0x10 as mapping to unicode. Instead of checking for this
random and undocumented return value, simply assign all function
keys explicitly. This patch also splits the ill-named "known_keys"
array into "modifier_keys" and "function_keys" which is much
more obvious.
(cherry picked from commit 55f9e5cbaf9c5f6761d7bce7a1672bc1552e2f07)
Michael Natterer [Tue, 21 Feb 2012 16:19:35 +0000 (17:19 +0100)]
GdkScreen: fix precondition checks in the public API
Move g_return_if_fail() stuff from the backends to the public
functions in gdkscreen.c itself, and some fixes for ugly formatting in
the various gdkscreen-backend.c files.
Cosimo Cecchi [Tue, 21 Feb 2012 11:07:36 +0000 (12:07 +0100)]
entry: fix progressbar area size for interior-focus = FALSE
No need to subtract focus line width again, since the progressbar is
rendered starting at (0, 0).
This also fixes the entry-progressbar-coloring reftest.
Chun-wei Fan [Tue, 21 Feb 2012 10:03:04 +0000 (18:03 +0800)]
Update Visual C++ property sheets
The file "installation" part needed a long-overdue update, especially
as some headers were simply moved into gtk/deprecated and some new headers
were introduced, and a new .gschema.xml file needed to be processed.