We emulate visibility by unmapping (in X) all mapped (according to
gdk) windows that are not visible (all parents mapped). This is because
there may be client side windows inbetween the native windows in the
hierarchy, so you can't know a native window is visible just because
all the parent native windows are mapped.
However, we don't want to unmap foreign windows, as that may cause all
sort of unexpected issues. This should be safe, because generally the
parent of a foreign window is a native window (e.g. a socket), so its
gdk visibility state is the same as the Xserver one.
This fixes an issue with the GDM notification area where the unmap of
the plug caused spurious UnmapNotify events that confused GtkSocket and
caused icons to become one pixel wide.
Last commit was bad, as it didn't clip against client side
children. This implements such clipping first and then
only clears the rectangles that need to be cleared.
This is how cairo works with native children.
This fixes an issue where the drag target outline is visible on the
evolution folder treeview when it isn't with native windows.
Without this we can't draw to them, which caused problems for e.g.
gnome-settings-daemon clearing the background when the desktop
background changed.
Note: We don't actually clip away child windows from the root window,
the clip is just based on the size of the root window.
Reserving toggle space is nice for consistency in main menus
and context menus, but it gets in the way in special situations,
such as combo boxes, tabular menus, etc.
GtkNotebook used gdk_window_get_pointer() incorrectly, as it already
had coordinates from various GdkEvents. Using get_pointer() means
that you get pointer positions *after* the event has happened, which
leads to visual out-of-sync results, or inadvertently detached tabs if
you click on them while your machine is being slow.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
Don't pass the click on the button through to the scale when the
dock popup will be moved, otherwise we could end up changing the
sound in unexcepted ways (to zero for vertical popups at the bottom
of the screen for example).
gtk/gtkmenuitem.c: Override custom_tag_finished() for "accelerator" and search
the correct toplevel GtkWindow to attach accelerators to menu items.
gtk/gtkwidget.[ch]: Added _gtk_widget_buildable_finish_accelerator() to allow
subclasses to specify a toplevel window to associate with when parsing <accelerator>
tags
We do want to have consistent padding in menus in menubars and context
menus, but the menus used in comboboxes don't need the extra padding.
Add private GtkMenu API for turning this off. Bug 564063
Setting a tooltip on a widget unfortunately triggers several roundtrips
to the X server. We reduce this overhead by only doing it if the
widget is visible, and by deferring to an idle. See bug 585626.
The virtual method list_shortcut_folders returns a GSList * of GFile *.
In turn, gtk_file_chooser_list_shortcut_folders() converts those to strings.
However, the delegate in gtkfilechooserutils.c was calling
gtk_file_chooser_list_shortcut_folders() every time, so we were trying
to convert invalid data.
Now we have an internal function that deals with GFile *. That
function is called by the delegate, and the conversion is done only
once by the API entry points.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
We can't set the sort column when we load the GtkFileChooser's settings, as the
file models may not have been created yet. Wait until the models are actually
present; then we can set the sort column.
Signed-off-by: Federico Mena Quintero <federico@novell.com>