diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-10-07 19:42:49 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-10-07 19:42:49 +0000 |
commit | 253458ec525ac1d1ed45ce47a79365df7905e01f (patch) | |
tree | 3712ec56f7242c2d56b4c8dfbdb03e9aff4ff8df /gtk/gtkcolorsel.c | |
parent | 55704fc7c1b5429bf8cc7e8100893b01898a9fe8 (diff) | |
download | gtk+-253458ec525ac1d1ed45ce47a79365df7905e01f.tar.gz |
- Replace GdkPointerHooks with a multihead-safe GdkDisplayPointerHooks,
Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkinternals.h
gdk/gdkwindow.[ch] gdk/linux-fb/gdkwindow-fb.c
gdk/win32/gdkwindow-win32.c gdk/x11/gdkwindow-x11.c:
- Replace GdkPointerHooks with a multihead-safe
GdkDisplayPointerHooks, leave GdkPointerHooks
around for singlehead.
- Add gdk_display_get_pointer() to get the pointer
location with the screen it is on.
* gdk/gdk.def gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch]:
Change gdk_screen_get_window_at_pointer() to
gdk_display_get_window_at_pointer().
* gtk/gtktreeview.c demos/gtk-demo/changedisplay.c
tests/testgtk.c: Use gdk_display_get_window_at_pointer(),
not gdk_screen_get_window_at_pointer().
* gtk/gtkcolorsel.c: Fix grabbing color to be multihead
safe.
* gtk/gtkwidget.c: Allow gtk_widget_push_colormap (NULL).
since it is useful for writing code that doesn't
know the dcurrent state but needs a clean colormap.
* gtk/gtkrc.c: When loading the settings for a particular
screen, only reset toplevels on that screen.
* gtk/gtkiconfactory.h: Fix #ifdef GTK_MULTIHEAD_SAFE
that should have been #ifndef GTK_MULTIHEAD_SAFE.
Diffstat (limited to 'gtk/gtkcolorsel.c')
-rw-r--r-- | gtk/gtkcolorsel.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c index 069fa8c576..dc43894d7a 100644 --- a/gtk/gtkcolorsel.c +++ b/gtk/gtkcolorsel.c @@ -1140,7 +1140,7 @@ make_picker_cursor (GdkScreen *screen) } static void -grab_color_at_mouse (GtkWidget *invisible, +grab_color_at_mouse (GdkScreen *screen, gint x_root, gint y_root, gpointer data) @@ -1150,8 +1150,8 @@ grab_color_at_mouse (GtkWidget *invisible, GtkColorSelection *colorsel = data; ColorSelectionPrivate *priv; GdkColor color; - GdkColormap *colormap = gdk_screen_get_system_colormap (gtk_widget_get_screen (invisible)); - GdkWindow *root_window = gdk_screen_get_root_window (gtk_widget_get_screen (invisible)); + GdkColormap *colormap = gdk_screen_get_system_colormap (screen); + GdkWindow *root_window = gdk_screen_get_root_window (screen); priv = colorsel->private_data; @@ -1196,7 +1196,8 @@ mouse_motion (GtkWidget *invisible, GdkEventMotion *event, gpointer data) { - grab_color_at_mouse (invisible, event->x_root, event->y_root, data); + grab_color_at_mouse (gdk_event_get_screen ((GdkEvent *)event), + event->x_root, event->y_root, data); } static gboolean @@ -1211,7 +1212,8 @@ mouse_release (GtkWidget *invisible, if (event->button != 1) return FALSE; - grab_color_at_mouse (invisible, event->x_root, event->y_root, data); + grab_color_at_mouse (gdk_event_get_screen ((GdkEvent *)event), + event->x_root, event->y_root, data); shutdown_eyedropper (GTK_WIDGET (data)); |