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.
Benjamin Otte [Fri, 6 Jan 2012 04:04:13 +0000 (05:04 +0100)]
label: Redo attribute application
- Don't compute link color attributes until layout creation
This is useful as a performance enhancement, because we don't have to
lookup the property after setting the text, so multiple markup sets
don't cost style lookups.
- Don't merge attrs into effective_attrs
We do this when applying link colors now. Keeping them separate allows
invalidating them separately.
Benjamin Otte [Fri, 6 Jan 2012 00:52:32 +0000 (01:52 +0100)]
label: Redo links parsing
Instead of getting confused by applied underline or color tags in the
regular markup, we store the link start/end when we actually parse the
text. As a bonus, we can avoid rescanning links when creating the
markup.
Benjamin Otte [Thu, 5 Jan 2012 15:48:14 +0000 (16:48 +0100)]
a11y: Remove keysnooping support
As previously announced, key snooping is something that we should not
support in GTK. In particular because AT-SPI made every key press a
synchronous DBUS call / spawned a nested main loop with the key
snoopers. This breaks responsiveness, order of key presses and internal
consistency when the AT decides to remove key events.
Benjamin Berg [Wed, 28 Dec 2011 00:02:28 +0000 (01:02 +0100)]
Improve PICKONE_* handling in GtkPrinterOptionWidget (bug #543520)
This patch modifies GtkPrinterOptionWidget to support loading them
again. It also allows the user to enter values from the dropdown list
to select the item.
Rob Bradford [Thu, 5 Jan 2012 16:32:09 +0000 (16:32 +0000)]
wayland: Set a default cursor when the window cursor is set to NULL
This change follows on from a change in semantics in Wayland where calling
wl_input_device_attach with nil would make the compositor set the pointer
sprite to it's default cursor sprite.
Xan Lopez [Fri, 30 Dec 2011 20:09:21 +0000 (21:09 +0100)]
GtkNotebook: fix crash when DnD tabs between windows
When doing DnD between windows the tab label is set as the child of
the DnD info window. If this is happening the remove method of
GtkNotebook should not unparent the tab label, since it's been already
unparented, belongs to the DnD window and will be properly destroyed
when the DnD is over.
Matthias Clasen [Tue, 3 Jan 2012 15:51:13 +0000 (10:51 -0500)]
Fix problems with DND on some X servers
When the X server does not support the shape extension (as some
vnc implementations seem to), our DND code was always seeing
an empty input shape, so drops always missed their target.
Emmanuele Bassi [Tue, 5 Oct 2010 13:07:32 +0000 (14:07 +0100)]
Add symbolic constants for event emission control
Similar to https://bugzilla.gnome.org/show_bug.cgi?id=631413 in GLib,
GTK+ should have symbolic constants for controlling the event handling
instead of a mere boolean value.
The GDK_EVENT_PROPAGATE and GDK_EVENT_STOP constants map to FALSE and
TRUE respectively.
Chun-wei Fan [Fri, 30 Dec 2011 08:21:38 +0000 (16:21 +0800)]
Update gdk/gdkconfig.h.win32
Apparently the deprecation warning macros are placed into gdkconfig.h
during the configure stage, so put these in the pre-configured
gdkconfig.h.win32 as well, as their definitions are needed for all builds.
Matthias Clasen [Fri, 30 Dec 2011 04:38:16 +0000 (23:38 -0500)]
GtkImContextSimple: fix tentative match handling
When switching to the compact table format, we inadvertedly lost
the 'tentative match' handling which allows to complete longer
compose sequences even if a prefix is a complete sequence.
This was pointed out in bug 666710.
Benjamin Otte [Wed, 28 Dec 2011 13:34:54 +0000 (14:34 +0100)]
settings: Cache style properties
This way we don't need to compute them every lookup. (That's not the
real reason though - the real reason is that I want to add new APIs that
require the caching because they return consts).
Matthias Clasen [Wed, 28 Dec 2011 16:20:47 +0000 (11:20 -0500)]
Fix problems with sticky handling
Reading a card32 property into a long may lead to undefined high
bits, so mask them off. Also, make the conditions for setting and
unsetting the stick flag opposites, to avoid unintended changes.
Patch by John Lindgren, bug 666842
Matthias Clasen [Wed, 28 Dec 2011 16:16:54 +0000 (11:16 -0500)]
Update various EWMH interactions
The current EWMH has added 'source indication' fields to a number
of client messages. Set these to 1 to indicate a regular client.
Also fill the button field of _NET_WM_MOVERESIZE.