Assign the size of the screen to the root window

On startup, the root window got assigned the size of the main screen.
But, the GdkScreen has the width of all screens/monitors connected to the
machine.  Change this so that in _gdk_windowing_window_init, we assign
the width/height of all monitors to the root window width, height.
Should fix bug 594738.
This commit is contained in:
Kristian Rietveld
2009-09-15 11:04:50 +02:00
parent cf80feb3dd
commit d797dcc4dd

View File

@ -955,16 +955,20 @@ _gdk_windowing_window_init (void)
private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
private->impl_window = private;
/* Note: This needs to be reworked for multi-screen support. */
impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (_gdk_root)->impl);
rect = [[NSScreen mainScreen] frame];
/* The size of the root window should be the same as the size of
* the screen it belongs to.
*
* FIXME: Of course this needs to be updated when you change the monitor
* configuration (add another one, remove one, etc).
*/
private->x = 0;
private->y = 0;
private->abs_x = 0;
private->abs_y = 0;
private->width = rect.size.width;
private->height = rect.size.height;
private->width = gdk_screen_get_width (_gdk_screen);
private->height = gdk_screen_get_height (_gdk_screen);
private->state = 0; /* We don't want GDK_WINDOW_STATE_WITHDRAWN here */
private->window_type = GDK_WINDOW_ROOT;