summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-10-18 22:46:37 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-10-18 22:46:37 +0000
commit70b6a570030155b8fea586d15d1ff42fe12dee6f (patch)
tree18bbae3710e25e9329baec5859484b999951b7ab
parent915c2db3b927bba04ad469afc6a0186741bb06bf (diff)
downloadmetacity-70b6a570030155b8fea586d15d1ff42fe12dee6f.tar.gz
call meta_image_window_new in multihead-safe way
2002-10-18 Havoc Pennington <hp@redhat.com> * src/effects.c (meta_effects_draw_box_animation): call meta_image_window_new in multihead-safe way * src/ui.c (meta_image_window_new): multihead safety
-rw-r--r--ChangeLog7
-rw-r--r--src/effects.c4
-rw-r--r--src/ui.c12
-rw-r--r--src/ui.h4
4 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 25cfa977..cbe24378 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2002-10-18 Havoc Pennington <hp@redhat.com>
+ * src/effects.c (meta_effects_draw_box_animation): call
+ meta_image_window_new in multihead-safe way
+
+ * src/ui.c (meta_image_window_new): multihead safety
+
+2002-10-18 Havoc Pennington <hp@redhat.com>
+
* src/window.c (meta_window_refresh_resize_popup): only create the
resize popup if width_inc or height_inc are > 1
diff --git a/src/effects.c b/src/effects.c
index 4b73e4d5..18fa5947 100644
--- a/src/effects.c
+++ b/src/effects.c
@@ -333,7 +333,9 @@ meta_effects_draw_box_animation (MetaScreen *screen,
}
else
{
- context->image_window = meta_image_window_new (initial_rect->width,
+ context->image_window = meta_image_window_new (screen->display->xdisplay,
+ screen->number,
+ initial_rect->width,
initial_rect->height);
context->orig_pixbuf = pix;
meta_image_window_set (context->image_window,
diff --git a/src/ui.c b/src/ui.c
index b6d03de3..50f24be6 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -303,13 +303,21 @@ struct _MetaImageWindow
};
MetaImageWindow*
-meta_image_window_new (int max_width,
- int max_height)
+meta_image_window_new (Display *xdisplay,
+ int screen_number,
+ int max_width,
+ int max_height)
{
MetaImageWindow *iw;
+ GdkDisplay *gdisplay;
+ GdkScreen *gscreen;
+ gdisplay = gdk_x11_lookup_xdisplay (xdisplay);
+ gscreen = gdk_display_get_screen (gdisplay, screen_number);
+
iw = g_new (MetaImageWindow, 1);
iw->window = gtk_window_new (GTK_WINDOW_POPUP);
+ gtk_window_set_screen (GTK_WINDOW (iw->window), gscreen);
gtk_widget_realize (iw->window);
iw->pixmap = gdk_pixmap_new (iw->window->window,
max_width, max_height,
diff --git a/src/ui.h b/src/ui.h
index 90598f8f..488ce8e7 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -104,7 +104,9 @@ void meta_ui_window_menu_popup (MetaWindowMenu *menu,
void meta_ui_window_menu_free (MetaWindowMenu *menu);
-MetaImageWindow* meta_image_window_new (int max_width,
+MetaImageWindow* meta_image_window_new (Display *xdisplay,
+ int screen_number,
+ int max_width,
int max_height);
void meta_image_window_free (MetaImageWindow *iw);
void meta_image_window_set_showing (MetaImageWindow *iw,