summaryrefslogtreecommitdiff
path: root/src/x11/window-x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11/window-x11.c')
-rw-r--r--src/x11/window-x11.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 5abc848a6..df8d66614 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -1379,9 +1379,8 @@ meta_window_x11_new (MetaDisplay *display,
gboolean must_be_viewable,
MetaCompEffect effect)
{
+ MetaScreen *screen = display->screen;
XWindowAttributes attrs;
- MetaScreen *screen = NULL;
- GSList *tmp;
gulong existing_wm_state;
MetaWindow *window = NULL;
gulong event_mask;
@@ -1411,19 +1410,12 @@ meta_window_x11_new (MetaDisplay *display,
goto error;
}
- for (tmp = display->screens; tmp != NULL; tmp = tmp->next)
+ if (attrs.root != screen->xroot)
{
- MetaScreen *scr = tmp->data;
-
- if (scr->xroot == attrs.root)
- {
- screen = tmp->data;
- break;
- }
+ meta_verbose ("Not on our screen\n");
+ goto error;
}
- g_assert (screen);
-
if (is_our_xwindow (display, screen, xwindow, &attrs))
{
meta_verbose ("Not managing our own windows\n");