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
This commit is contained in:
Havoc Pennington 2002-10-18 22:46:37 +00:00 committed by Havoc Pennington
parent 915c2db3b9
commit 70b6a57003
4 changed files with 23 additions and 4 deletions

View File

@ -1,3 +1,10 @@
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> 2002-10-18 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_refresh_resize_popup): only create the * src/window.c (meta_window_refresh_resize_popup): only create the

View File

@ -333,7 +333,9 @@ meta_effects_draw_box_animation (MetaScreen *screen,
} }
else 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); initial_rect->height);
context->orig_pixbuf = pix; context->orig_pixbuf = pix;
meta_image_window_set (context->image_window, meta_image_window_set (context->image_window,

View File

@ -303,13 +303,21 @@ struct _MetaImageWindow
}; };
MetaImageWindow* MetaImageWindow*
meta_image_window_new (int max_width, meta_image_window_new (Display *xdisplay,
int max_height) int screen_number,
int max_width,
int max_height)
{ {
MetaImageWindow *iw; 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 = g_new (MetaImageWindow, 1);
iw->window = gtk_window_new (GTK_WINDOW_POPUP); iw->window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_screen (GTK_WINDOW (iw->window), gscreen);
gtk_widget_realize (iw->window); gtk_widget_realize (iw->window);
iw->pixmap = gdk_pixmap_new (iw->window->window, iw->pixmap = gdk_pixmap_new (iw->window->window,
max_width, max_height, max_width, max_height,

View File

@ -104,7 +104,9 @@ void meta_ui_window_menu_popup (MetaWindowMenu *menu,
void meta_ui_window_menu_free (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); int max_height);
void meta_image_window_free (MetaImageWindow *iw); void meta_image_window_free (MetaImageWindow *iw);
void meta_image_window_set_showing (MetaImageWindow *iw, void meta_image_window_set_showing (MetaImageWindow *iw,