Benjamin Otte [Thu, 29 Dec 2011 21:05:10 +0000 (22:05 +0100)]
reftests: Add a test comparing inherit and initial
One test has all properties set to 'inherit', the other to 'initial'.
This should result in the same result, as inherit will ensure every
widget inherits the same value, and for the toplevel 'inherit' is
defined as being identical to 'initial'.
Benjamin Otte [Thu, 29 Dec 2011 13:26:45 +0000 (14:26 +0100)]
css: Change prototype of _gtk_css_selector_matches()
Passing the length of the widget path that is relevant is not necessary
anymore, it was only useful for inheritance. Instead, we now pass the
state flags and let the selector do the state matching for us.
Benjamin Otte [Thu, 29 Dec 2011 13:04:33 +0000 (14:04 +0100)]
css: Make CSS resolving work according to spec
See inline code comments taken from
http://dev.w3.org/csswg/css3-cascade/#cascade
This now respects the special values "inherit" and "initial" properly.
Note that those values cannot be parsed yet. This will be added in a
future commit.
Stefan Sauer [Mon, 9 Jan 2012 17:16:53 +0000 (18:16 +0100)]
gtkscale: fix bogus compare func
The GtkScaleMark values are gdouble, a simple a-b compare func would fail for
values with the same integer value. This breaks the sorting and causes random
marker label placement.
Rob Bradford [Mon, 9 Jan 2012 17:15:00 +0000 (17:15 +0000)]
wayland: Constrain the window configure requests to the window's geometry
When we receive a configure event from Wayland telling us to resize our
surface we check against the geometry constraints for the window to ensure we
do not resize below the minimum and maximum limits.
Rui Matos [Thu, 22 Dec 2011 14:44:50 +0000 (14:44 +0000)]
window: Stop setting state flags on the style context for drawing
This also removes setting the FOCUSED state flag when
gtk_window_has_toplevel_focus() since this effect can now be done with the new
WINDOW_UNFOCUSED flag instead which actually works better regarding X grabs
and modal windows.
Rob Bradford [Mon, 9 Jan 2012 16:00:14 +0000 (16:00 +0000)]
wayland: Make the resize and move functions use gdk_device_ungrab
Now that grab and ungrab vfuncs are implemented on GdkDevice then we can use
gdk_device_ungrab to break the implicit grab created by the button press that
triggered the resize and move.
Matthias Clasen [Tue, 3 Jan 2012 20:02:49 +0000 (15:02 -0500)]
GtkApplication: Add an inhibit api
This lets applications block logout and similar actions ahead
of time. Currently only implemented for D-Bus, but Windows has
very similar API since Vista.
Matthias Clasen [Tue, 3 Jan 2012 19:52:29 +0000 (14:52 -0500)]
GtkApplication: Add logout notification
This is fairly basic, allowing applications to learn when
the session manager is about to end the session, and possibly
block this. The only implementation at this point is using the
org.gnome.SessionManager D-Bus interface of gnome-session. It should
be straightforward to port the EggSMClient implementations for
Windows and OS X.
Rob Bradford [Fri, 6 Jan 2012 16:49:22 +0000 (16:49 +0000)]
wayland: Break an implicit grab when asking to be resized
An implicit grab is created inside GTK+ when the button is pressed down on a
window. The semantics of wl_shell_surface_resize means that you don't get a
corresponding release event that would ordinarily break the implicit grab. So
we must do it as part of the resize request.
Matthias Clasen [Fri, 6 Jan 2012 04:21:30 +0000 (23:21 -0500)]
Another attempt at fixing menu positioning corner cases
The code for moving the menu into monitor / workarea was duplicated,
once for the push-in scenario and once for without. The problem with
the second case is that we've stored the menu position before adjusting
it. That made us remember an out-of-monitor position that then later
triggered _another_ copy of this code in the size-request implementation.
Unify this to only have one copy of code, and only store the menu
position after adjusting it to be inside the monitor. This fixes both
statusicon menus that get popped up from the panel, outside the workarea,
to not have scroll arrows, and the gedit language menu which was not
placed in the monitor at all after the initial workarea commit.
As a side-effect of this change, we now make large scrolling menus
occupy the full height of the workarea. Before this change, we were
keeping either the top or bottom edge put while shrinking the menu
to fit in the monitor.
Benjamin Otte [Fri, 6 Jan 2012 04:10:50 +0000 (05:10 +0100)]
label: Make attr_list_merge() use sane merging rules
Instead of "attribute with later start index wins, make sure the
attribute list that is merged from takes precedence. This now gives the
multiple attribute lists we use in the label an order:
1) gtk_label_set_attributes()
These attributes override everything. It's what the function's there
for after all.
2) markup of label
Other user-specified attributes come next.
3) attributes for links
When we apply custom attributes on parts of the text, we put them
last. We don't want to mess with what the user does. Also, we change
color and underline, so we usually have something to show.