From c1c7afb03aa577c4810087d4ead8f6946296456a Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 16 Oct 2007 13:56:34 +0000 Subject: [PATCH] libgimp/gimppatternselectbutton.c libgimp/gimpbrushselectbutton.c 2007-10-16 Sven Neumann * libgimp/gimppatternselectbutton.c * libgimp/gimpbrushselectbutton.c * libgimpwidgets/gimpcolorarea.c * app/widgets/gimpdnd.c * app/widgets/gimpdockbook.c: set GDK_WINDOW_TYPE_HINT_DND on popup windows used to implement a DND cursor. svn path=/trunk/; revision=23841 --- ChangeLog | 6 ++++++ app/widgets/gimpdnd.c | 4 ++++ app/widgets/gimpdockbook.c | 8 +++++--- libgimp/gimpbrushselectbutton.c | 6 ++++-- libgimp/gimppatternselectbutton.c | 6 ++++-- libgimpwidgets/gimpcolorarea.c | 3 +++ 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 947dc9fe53..cee03049f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-16 Sven Neumann + + * app/widgets/gimpdnd.c + * app/widgets/gimpdockbook.c: set GDK_WINDOW_TYPE_HINT_DND on + popup windows used to implement a DND cursor. + 2007-10-16 Sven Neumann * tools/pdbgen/pdb/gradient.pdb: increased the arbitrary upper diff --git a/app/widgets/gimpdnd.c b/app/widgets/gimpdnd.c index f8b744b2d8..0e6cdc9d71 100644 --- a/app/widgets/gimpdnd.c +++ b/app/widgets/gimpdnd.c @@ -692,6 +692,10 @@ gimp_dnd_data_drag_begin (GtkWidget *widget, GtkWidget *window; window = gtk_window_new (GTK_WINDOW_POPUP); + gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DND); + gtk_window_set_screen (GTK_WINDOW (window), + gtk_widget_get_screen (widget)); + gtk_widget_realize (window); frame = gtk_frame_new (NULL); diff --git a/app/widgets/gimpdockbook.c b/app/widgets/gimpdockbook.c index 36dc24f1a0..96f14b510b 100644 --- a/app/widgets/gimpdockbook.c +++ b/app/widgets/gimpdockbook.c @@ -579,10 +579,14 @@ gimp_dockbook_tab_drag_begin (GtkWidget *widget, GdkDragContext *context, GimpDockable *dockable) { - GtkWidget *window = gtk_window_new (GTK_WINDOW_POPUP); + GtkWidget *window; GtkWidget *view; GtkRequisition requisition; + window = gtk_window_new (GTK_WINDOW_POPUP); + gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DND); + gtk_window_set_screen (GTK_WINDOW (window), gtk_widget_get_screen (widget)); + view = gimp_dockable_get_tab_widget (dockable, dockable->context, GIMP_TAB_STYLE_ICON_BLURB, @@ -601,8 +605,6 @@ gimp_dockbook_tab_drag_begin (GtkWidget *widget, gtk_container_add (GTK_CONTAINER (window), view); gtk_widget_show (view); - gtk_window_set_screen (GTK_WINDOW (window), gtk_widget_get_screen (widget)); - gtk_widget_size_request (view, &requisition); if (requisition.width < widget->allocation.width) diff --git a/libgimp/gimpbrushselectbutton.c b/libgimp/gimpbrushselectbutton.c index 97e27de9fe..1006e0b16e 100644 --- a/libgimp/gimpbrushselectbutton.c +++ b/libgimp/gimpbrushselectbutton.c @@ -778,7 +778,11 @@ gimp_brush_select_button_open_popup (GimpBrushSelectButton *button, if (priv->width <= CELL_SIZE && priv->height <= CELL_SIZE) return; + screen = gtk_widget_get_screen (GTK_WIDGET (button)); + priv->popup = gtk_window_new (GTK_WINDOW_POPUP); + gtk_window_set_type_hint (GTK_WINDOW (priv->popup), GDK_WINDOW_TYPE_HINT_DND); + gtk_window_set_screen (GTK_WINDOW (priv->popup), screen); frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT); @@ -793,8 +797,6 @@ gimp_brush_select_button_open_popup (GimpBrushSelectButton *button, /* decide where to put the popup */ gdk_window_get_origin (priv->preview->window, &x_org, &y_org); - screen = gtk_widget_get_screen (priv->popup); - scr_w = gdk_screen_get_width (screen); scr_h = gdk_screen_get_height (screen); diff --git a/libgimp/gimppatternselectbutton.c b/libgimp/gimppatternselectbutton.c index 28ba910b34..0d45113020 100644 --- a/libgimp/gimppatternselectbutton.c +++ b/libgimp/gimppatternselectbutton.c @@ -577,7 +577,11 @@ gimp_pattern_select_button_open_popup (GimpPatternSelectButton *button, if (priv->width <= CELL_SIZE && priv->height <= CELL_SIZE) return; + screen = gtk_widget_get_screen (GTK_WIDGET (button)); + priv->popup = gtk_window_new (GTK_WINDOW_POPUP); + gtk_window_set_type_hint (GTK_WINDOW (priv->popup), GDK_WINDOW_TYPE_HINT_DND); + gtk_window_set_screen (GTK_WINDOW (priv->popup), screen); frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT); @@ -592,8 +596,6 @@ gimp_pattern_select_button_open_popup (GimpPatternSelectButton *button, /* decide where to put the popup */ gdk_window_get_origin (priv->preview->window, &x_org, &y_org); - screen = gtk_widget_get_screen (priv->popup); - scr_w = gdk_screen_get_width (screen); scr_h = gdk_screen_get_height (screen); diff --git a/libgimpwidgets/gimpcolorarea.c b/libgimpwidgets/gimpcolorarea.c index fca5eb253d..f74b96eab7 100644 --- a/libgimpwidgets/gimpcolorarea.c +++ b/libgimpwidgets/gimpcolorarea.c @@ -661,6 +661,9 @@ gimp_color_area_drag_begin (GtkWidget *widget, GtkWidget *color_area; window = gtk_window_new (GTK_WINDOW_POPUP); + gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DND); + gtk_window_set_screen (GTK_WINDOW (window), gtk_widget_get_screen (widget)); + gtk_widget_realize (window); frame = gtk_frame_new (NULL);