~mkhu/compiz/fix_startup_notification_busy_cursor_0.9.9

« back to all changes in this revision

Viewing changes to src/event.cpp

  • Committer: Tarmac
  • Author(s): Łukasz 'sil2100' Zemczak
  • Date: 2013-04-11 08:38:38 UTC
  • mfrom: (3644.2.1 0.9.9)
  • Revision ID: tarmac-20130411083838-88bw0yuolu4ig61c
Qt is stupid since it uses the stupid X11 protocol - let's not set all the attributes (especially override_redirect) every time, only in cases when it's actually needed (LP: #1141079). Fixes: https://bugs.launchpad.net/bugs/1141079.

Approved by PS Jenkins bot, Sam Spilsbury.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1285
1285
         * the window to the window list as we might get configure requests
1286
1286
         * which require us to stack other windows relative to it. Setting
1287
1287
         * some default values if this is the case. */
1288
 
        if (!XGetWindowAttributes (privateScreen.dpy, event->xcreatewindow.window, &wa))
 
1288
        if (!XGetWindowAttributes (privateScreen.dpy, event->xcreatewindow.window, &wa)) {
1289
1289
            privateScreen.setDefaultWindowAttributes (&wa);
1290
1290
 
1291
 
        /* That being said, we should store as much information as possible
1292
 
         * about it. There may be requests relative to this window that could
1293
 
         * use the data in the XCreateWindowEvent structure, especially the
1294
 
         * override redirect state */
1295
 
        wa.x = event->xcreatewindow.x;
1296
 
        wa.y = event->xcreatewindow.y;
1297
 
        wa.width = event->xcreatewindow.width;
1298
 
        wa.height = event->xcreatewindow.height;
1299
 
        wa.border_width = event->xcreatewindow.border_width;
1300
 
        wa.override_redirect = event->xcreatewindow.override_redirect;
 
1291
            /* That being said, we should store as much information as possible
 
1292
             * about it. There may be requests relative to this window that could
 
1293
             * use the data in the XCreateWindowEvent structure, especially the
 
1294
             * override redirect state */
 
1295
            wa.x = event->xcreatewindow.x;
 
1296
            wa.y = event->xcreatewindow.y;
 
1297
            wa.width = event->xcreatewindow.width;
 
1298
            wa.height = event->xcreatewindow.height;
 
1299
            wa.border_width = event->xcreatewindow.border_width;
 
1300
            wa.override_redirect = event->xcreatewindow.override_redirect;
 
1301
        }
1301
1302
 
1302
1303
        foreach (CompWindow *w, screen->windows ())
1303
1304
        {
1475
1476
                 * the window to the window list as we might get configure requests
1476
1477
                 * which require us to stack other windows relative to it. Setting
1477
1478
                 * some default values if this is the case. */
1478
 
                if (!XGetWindowAttributes (privateScreen.dpy, event->xcreatewindow.window, &wa))
 
1479
                if (!XGetWindowAttributes (privateScreen.dpy, event->xcreatewindow.window, &wa)) {
1479
1480
                    privateScreen.setDefaultWindowAttributes (&wa);
1480
1481
 
1481
 
                /* That being said, we should store as much information as possible
1482
 
                 * about it. There may be requests relative to this window that could
1483
 
                 * use the data in the XCreateWindowEvent structure, especially the
1484
 
                 * override redirect state */
1485
 
                wa.x = event->xreparent.x;
1486
 
                wa.y = event->xreparent.y;
1487
 
                wa.override_redirect = event->xreparent.override_redirect;
 
1482
                    /* That being said, we should store as much information as possible
 
1483
                     * about it. There may be requests relative to this window that could
 
1484
                     * use the data in the XCreateWindowEvent structure, especially the
 
1485
                     * override redirect state */
 
1486
                    wa.x = event->xreparent.x;
 
1487
                    wa.y = event->xreparent.y;
 
1488
                    wa.override_redirect = event->xreparent.override_redirect;
 
1489
                }
1488
1490
 
1489
1491
                PrivateWindow::createCompWindow (getTopWindow ()->id (), getTopServerWindow ()->id (), wa, event->xreparent.window);
1490
1492
                break;