Merge lp:~compiz-team/compiz-core/compiz-core.fix_873389 into lp:compiz-core/0.9.5

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 2886
Proposed branch: lp:~compiz-team/compiz-core/compiz-core.fix_873389
Merge into: lp:compiz-core/0.9.5
Diff against target: 621 lines (+157/-263)
5 files modified
plugins/composite/src/privates.h (+0/-6)
plugins/composite/src/screen.cpp (+47/-113)
src/main.cpp (+11/-2)
src/screen.cpp (+98/-141)
src/window.cpp (+1/-1)
To merge this branch: bzr merge lp:~compiz-team/compiz-core/compiz-core.fix_873389
Reviewer Review Type Date Requested Status
Robert Carr (community) Approve
Review via email: mp+79457@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Robert Carr (robertcarr) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/composite/src/privates.h'
--- plugins/composite/src/privates.h 2011-10-08 11:38:21 +0000
+++ plugins/composite/src/privates.h 2011-10-15 07:07:10 +0000
@@ -114,12 +114,6 @@
114 int frameTimeAccumulator;114 int frameTimeAccumulator;
115115
116 CompWindowList withDestroyedWindows;116 CompWindowList withDestroyedWindows;
117
118 Window cmSnOwner;
119 Atom cmSnAtom;
120 Atom netCmHandoffAtom;
121 bool netCmHandoffSupported;
122 bool mInit;
123};117};
124118
125class PrivateCompositeWindow : WindowInterface119class PrivateCompositeWindow : WindowInterface
126120
=== modified file 'plugins/composite/src/screen.cpp'
--- plugins/composite/src/screen.cpp 2011-10-08 11:38:21 +0000
+++ plugins/composite/src/screen.cpp 2011-10-15 07:07:10 +0000
@@ -199,7 +199,6 @@
199 priv (new PrivateCompositeScreen (this))199 priv (new PrivateCompositeScreen (this))
200{200{
201 int compositeMajor, compositeMinor;201 int compositeMajor, compositeMinor;
202 XSetWindowAttributes attr;
203202
204 if (!XQueryExtension (s->dpy (), COMPOSITE_NAME,203 if (!XQueryExtension (s->dpy (), COMPOSITE_NAME,
205 &priv->compositeOpcode,204 &priv->compositeOpcode,
@@ -249,27 +248,23 @@
249248
250 priv->slowAnimations = false;249 priv->slowAnimations = false;
251250
252 attr.override_redirect = true;251 if (!priv->init ())
253 attr.event_mask = PropertyChangeMask;252 {
254253 setFailed ();
255 priv->cmSnOwner =254 }
256 XCreateWindow (screen->dpy (), screen->root (),
257 -100, -100, 1, 1, 0,
258 CopyFromParent, CopyFromParent,
259 CopyFromParent,
260 CWOverrideRedirect | CWEventMask,
261 &attr);
262255
263}256}
264257
265CompositeScreen::~CompositeScreen ()258CompositeScreen::~CompositeScreen ()
266{259{
267 priv->paintTimer.stop ();260 priv->paintTimer.stop ();
261
268#ifdef USE_COW262#ifdef USE_COW
269 if (useCow)263 if (useCow)
270 XCompositeReleaseOverlayWindow (screen->dpy (),264 XCompositeReleaseOverlayWindow (screen->dpy (),
271 screen->root ());265 screen->root ());
272#endif266#endif
267
273 delete priv;268 delete priv;
274}269}
275270
@@ -294,21 +289,12 @@
294 pHnd (NULL),289 pHnd (NULL),
295 FPSLimiterMode (CompositeFPSLimiterModeDefault),290 FPSLimiterMode (CompositeFPSLimiterModeDefault),
296 frameTimeAccumulator (0),291 frameTimeAccumulator (0),
297 withDestroyedWindows (),292 withDestroyedWindows ()
298 cmSnOwner (0),
299 netCmHandoffAtom (XInternAtom (screen->dpy (), "_COMPIZ_NET_CM_HANDOFF", 0)),
300 netCmHandoffSupported (false),
301 mInit (false)
302{293{
303 std::ostringstream oss;
304 gettimeofday (&lastRedraw, 0);294 gettimeofday (&lastRedraw, 0);
305 // wrap outputChangeNotify295 // wrap outputChangeNotify
306 ScreenInterface::setHandler (screen);296 ScreenInterface::setHandler (screen);
307297
308 oss << "_NET_WM_CM_S%d" << std::dec << screen->screenNum ();
309
310 cmSnAtom = XInternAtom (screen->dpy (), oss.str ().c_str (), 0);
311
312 optionSetSlowAnimationsKeyInitiate (CompositeScreen::toggleSlowAnimations);298 optionSetSlowAnimationsKeyInitiate (CompositeScreen::toggleSlowAnimations);
313}299}
314300
@@ -320,16 +306,21 @@
320PrivateCompositeScreen::init ()306PrivateCompositeScreen::init ()
321{307{
322 Display *dpy = screen->dpy ();308 Display *dpy = screen->dpy ();
309 Window newCmSnOwner = None;
310 Atom cmSnAtom = 0;
323 Time cmSnTimestamp = 0;311 Time cmSnTimestamp = 0;
324 XEvent event;312 XEvent event;
313 XSetWindowAttributes attr;
325 Window currentCmSnOwner;314 Window currentCmSnOwner;
326 int value = 0;315 char buf[128];
316
317 sprintf (buf, "_NET_WM_CM_S%d", screen->screenNum ());
318 cmSnAtom = XInternAtom (dpy, buf, 0);
327319
328 currentCmSnOwner = XGetSelectionOwner (dpy, cmSnAtom);320 currentCmSnOwner = XGetSelectionOwner (dpy, cmSnAtom);
329321
330 if (currentCmSnOwner != None)322 if (currentCmSnOwner != None)
331 {323 {
332 XSelectInput (screen->dpy (), currentCmSnOwner, StructureNotifyMask);
333 if (!replaceCurrentWm)324 if (!replaceCurrentWm)
334 {325 {
335 compLogMessage ("composite", CompLogLevelError,326 compLogMessage ("composite", CompLogLevelError,
@@ -343,19 +334,28 @@
343 }334 }
344 }335 }
345336
346 XChangeProperty (dpy, cmSnOwner, netCmHandoffAtom, XA_INTEGER, 8,337 attr.override_redirect = true;
347 PropModeReplace, (unsigned char *) &value, 1);338 attr.event_mask = PropertyChangeMask;
348 XChangeProperty (dpy, cmSnOwner, Atoms::wmName, Atoms::utf8String, 8,339
340 newCmSnOwner =
341 XCreateWindow (dpy, screen->root (),
342 -100, -100, 1, 1, 0,
343 CopyFromParent, CopyFromParent,
344 CopyFromParent,
345 CWOverrideRedirect | CWEventMask,
346 &attr);
347
348 XChangeProperty (dpy, newCmSnOwner, Atoms::wmName, Atoms::utf8String, 8,
349 PropModeReplace, (unsigned char *) PACKAGE,349 PropModeReplace, (unsigned char *) PACKAGE,
350 strlen (PACKAGE));350 strlen (PACKAGE));
351351
352 XWindowEvent (dpy, cmSnOwner, PropertyChangeMask, &event);352 XWindowEvent (dpy, newCmSnOwner, PropertyChangeMask, &event);
353353
354 cmSnTimestamp = event.xproperty.time;354 cmSnTimestamp = event.xproperty.time;
355355
356 XSetSelectionOwner (dpy, cmSnAtom, cmSnOwner, cmSnTimestamp);356 XSetSelectionOwner (dpy, cmSnAtom, newCmSnOwner, cmSnTimestamp);
357357
358 if (XGetSelectionOwner (dpy, cmSnAtom) != cmSnOwner)358 if (XGetSelectionOwner (dpy, cmSnAtom) != newCmSnOwner)
359 {359 {
360 compLogMessage ("core", CompLogLevelError,360 compLogMessage ("core", CompLogLevelError,
361 "Could not acquire compositing manager "361 "Could not acquire compositing manager "
@@ -378,20 +378,6 @@
378378
379 XSendEvent (dpy, screen->root (), FALSE, StructureNotifyMask, &event);379 XSendEvent (dpy, screen->root (), FALSE, StructureNotifyMask, &event);
380380
381 if (netCmHandoffSupported)
382 {
383 /* Wait for old compositing manager to go away */
384 if (currentCmSnOwner != None)
385 {
386 do {
387 XWindowEvent (dpy, currentCmSnOwner, StructureNotifyMask, &event);
388 } while (event.type != DestroyNotify);
389 }
390
391 XCompositeRedirectSubwindows (dpy, screen->root (),
392 CompositeRedirectManual);
393 }
394
395 return true;381 return true;
396}382}
397383
@@ -400,46 +386,25 @@
400CompositeScreen::registerPaintHandler (PaintHandler *pHnd)386CompositeScreen::registerPaintHandler (PaintHandler *pHnd)
401{387{
402 Display *dpy = screen->dpy ();388 Display *dpy = screen->dpy ();
403 Window currentCmSnOwner = 0;
404 int updateMode = 0;
405389
406 if (priv->active)390 if (priv->active)
407 return false;391 return false;
408392
409 CompScreen::checkForError (dpy);393 CompScreen::checkForError (dpy);
410394
411 /* Check if the previous compositor (if one is around)
412 * supports the _NET_CM_HANDOFF protocol, if so then
413 * we need to do an automatic redirect and paint the
414 * scene once and then tell it to go away */
415 priv->netCmHandoffSupported = false;
416 currentCmSnOwner = XGetSelectionOwner (screen->dpy (), priv->cmSnAtom);
417
418 if (currentCmSnOwner != priv->cmSnOwner)
419 {
420 Atom type;
421 int fmt;
422 unsigned long nitems, nleft;
423 unsigned char *prop;
424
425 if (XGetWindowProperty (screen->dpy (), currentCmSnOwner, priv->netCmHandoffAtom,
426 0L, 8L, false, XA_INTEGER, &type, &fmt,
427 &nitems, &nleft, &prop) == Success)
428 {
429 if (type == XA_INTEGER && fmt == 8 && nitems != 0 && nleft == 0)
430 {
431 priv->netCmHandoffSupported = true;
432 }
433
434 XFree (prop);
435 }
436 }
437
438 priv->netCmHandoffSupported ? updateMode = CompositeRedirectAutomatic :
439 updateMode = CompositeRedirectManual;
440
441 XCompositeRedirectSubwindows (dpy, screen->root (),395 XCompositeRedirectSubwindows (dpy, screen->root (),
442 updateMode);396 CompositeRedirectManual);
397
398 priv->overlayWindowCount = 0;
399
400 if (CompScreen::checkForError (dpy))
401 {
402 compLogMessage ("composite", CompLogLevelError,
403 "Another composite manager is already "
404 "running on screen: %d", screen->screenNum ());
405
406 return false;
407 }
443408
444 foreach (CompWindow *w, screen->windows ())409 foreach (CompWindow *w, screen->windows ())
445 {410 {
@@ -457,19 +422,13 @@
457 (boost::bind (&CompositeScreen::handlePaintTimeout, this),422 (boost::bind (&CompositeScreen::handlePaintTimeout, this),
458 priv->optimalRedrawTime);423 priv->optimalRedrawTime);
459424
460 if (priv->netCmHandoffSupported)
461 priv->paintTimer.setTimes (0, 0);
462
463 return true;425 return true;
464}426}
465427
466void428void
467CompositeScreen::unregisterPaintHandler ()429CompositeScreen::unregisterPaintHandler ()
468{430{
469 XEvent ev;
470 Display *dpy = screen->dpy ();431 Display *dpy = screen->dpy ();
471 bool oldCmSupportsHandoff = false;
472 Window currentCmSnOwner = None;
473432
474 foreach (CompWindow *w, screen->windows ())433 foreach (CompWindow *w, screen->windows ())
475 {434 {
@@ -481,38 +440,14 @@
481440
482 priv->overlayWindowCount = 0;441 priv->overlayWindowCount = 0;
483442
443 XCompositeUnredirectSubwindows (dpy, screen->root (),
444 CompositeRedirectManual);
445
484 priv->pHnd = NULL;446 priv->pHnd = NULL;
485 priv->active = false;447 priv->active = false;
486 priv->paintTimer.stop ();448 priv->paintTimer.stop ();
487449
488 Atom type;450 hideOutputWindow ();
489 int fmt;
490 unsigned long nitems, nleft;
491 unsigned char *prop;
492
493 /* Polling like this is very ugly */
494 while (currentCmSnOwner != priv->cmSnOwner)
495 currentCmSnOwner = XGetSelectionOwner (screen->dpy (), priv->cmSnAtom);
496
497 if (XGetWindowProperty (screen->dpy (), currentCmSnOwner, priv->netCmHandoffAtom,
498 0L, 8L, false, XA_INTEGER, &type, &fmt,
499 &nitems, &nleft, &prop) == Success)
500 {
501 if (type == XA_INTEGER && fmt == 8 && nitems != 0 && nleft == 0)
502 {
503 oldCmSupportsHandoff = true;
504 }
505
506 XFree (prop);
507 }
508
509 if (oldCmSupportsHandoff)
510 {
511 XCompositeUnredirectSubwindows (dpy, screen->root (),
512 CompositeRedirectManual);
513 }
514 else
515 hideOutputWindow ();
516}451}
517452
518bool453bool
@@ -666,6 +601,8 @@
666 else601 else
667#endif602#endif
668 output = overlay = screen->root ();603 output = overlay = screen->root ();
604
605 cScreen->hideOutputWindow ();
669}606}
670607
671Window608Window
@@ -956,9 +893,6 @@
956 else893 else
957 timeToNextRedraw = priv->getTimeToNextRedraw (&tv);894 timeToNextRedraw = priv->getTimeToNextRedraw (&tv);
958895
959 if (!priv->mInit)
960 priv->mInit = priv->init ();
961
962 if (priv->idle)896 if (priv->idle)
963 priv->paintTimer.setTimes (timeToNextRedraw, MAXSHORT);897 priv->paintTimer.setTimes (timeToNextRedraw, MAXSHORT);
964 else898 else
965899
=== modified file 'src/main.cpp'
--- src/main.cpp 2011-09-19 12:54:22 +0000
+++ src/main.cpp 2011-10-15 07:07:10 +0000
@@ -234,8 +234,17 @@
234 screen->priv)));234 screen->priv)));
235 }235 }
236236
237 if (!disableSm)237 if (!disableSm)
238 CompSession::init (clientId);238 {
239 if (clientId == NULL)
240 {
241 char *desktop_autostart_id = getenv ("DESKTOP_AUTOSTART_ID");
242 if (desktop_autostart_id != NULL)
243 clientId = strdup (desktop_autostart_id);
244 unsetenv ("DESKTOP_AUTOSTART_ID");
245 }
246 CompSession::init (clientId);
247 }
239248
240 return true;249 return true;
241}250}
242251
=== modified file 'src/screen.cpp'
--- src/screen.cpp 2011-10-08 11:38:21 +0000
+++ src/screen.cpp 2011-10-15 07:07:10 +0000
@@ -4460,99 +4460,6 @@
44604460
4461 XSendEvent (dpy, root, FALSE, StructureNotifyMask, &event);4461 XSendEvent (dpy, root, FALSE, StructureNotifyMask, &event);
44624462
4463 /* Need to set a default here so that the value isn't uninitialized
4464 * when loading plugins FIXME: Should find a way to initialize options
4465 * first and then set this value, or better yet, tie this value directly
4466 * to the option */
4467 priv->vpSize.setWidth (priv->optionGetHsize ());
4468 priv->vpSize.setHeight (priv->optionGetVsize ());
4469
4470 for (i = 0; i < SCREEN_EDGE_NUM; i++)
4471 {
4472 priv->screenEdge[i].id = None;
4473 priv->screenEdge[i].count = 0;
4474 }
4475
4476 priv->screenNum = DefaultScreen (dpy);
4477 priv->colormap = DefaultColormap (dpy, priv->screenNum);
4478 priv->root = root;
4479
4480 priv->snContext = sn_monitor_context_new (priv->snDisplay, priv->screenNum,
4481 compScreenSnEvent, this, NULL);
4482
4483 priv->wmSnSelectionWindow = newWmSnOwner;
4484 priv->wmSnAtom = wmSnAtom;
4485 priv->wmSnTimestamp = wmSnTimestamp;
4486
4487 if (!XGetWindowAttributes (dpy, priv->root, &priv->attrib))
4488 return false;
4489
4490 priv->workArea.setWidth (priv->attrib.width);
4491 priv->workArea.setHeight (priv->attrib.height);
4492
4493 priv->grabWindow = None;
4494
4495 templ.visualid = XVisualIDFromVisual (priv->attrib.visual);
4496
4497 visinfo = XGetVisualInfo (dpy, VisualIDMask, &templ, &nvisinfo);
4498 if (!nvisinfo)
4499 {
4500 compLogMessage ("core", CompLogLevelFatal,
4501 "Couldn't get visual info for default visual");
4502 return false;
4503 }
4504
4505 black.red = black.green = black.blue = 0;
4506
4507 if (!XAllocColor (dpy, priv->colormap, &black))
4508 {
4509 compLogMessage ("core", CompLogLevelFatal,
4510 "Couldn't allocate color");
4511 XFree (visinfo);
4512 return false;
4513 }
4514
4515 bitmap = XCreateBitmapFromData (dpy, priv->root, &data, 1, 1);
4516 if (!bitmap)
4517 {
4518 compLogMessage ("core", CompLogLevelFatal,
4519 "Couldn't create bitmap");
4520 XFree (visinfo);
4521 return false;
4522 }
4523
4524 priv->invisibleCursor = XCreatePixmapCursor (dpy, bitmap, bitmap,
4525 &black, &black, 0, 0);
4526 if (!priv->invisibleCursor)
4527 {
4528 compLogMessage ("core", CompLogLevelFatal,
4529 "Couldn't create invisible cursor");
4530 XFree (visinfo);
4531 return false;
4532 }
4533
4534 XFreePixmap (dpy, bitmap);
4535 XFreeColors (dpy, priv->colormap, &black.pixel, 1, 0);
4536
4537 XFree (visinfo);
4538
4539 priv->reshape (priv->attrib.width, priv->attrib.height);
4540
4541 priv->detectOutputDevices ();
4542 priv->updateOutputDevices ();
4543
4544 priv->getDesktopHints ();
4545
4546 priv->initialized = true;
4547
4548 /* TODO: Bailout properly when screenInitPlugins fails
4549 * TODO: It would be nicer if this line could mean
4550 * "init all the screens", but unfortunately it only inits
4551 * plugins loaded on the command line screen's and then
4552 * we need to call updatePlugins () to init the remaining
4553 * screens from option changes */
4554 assert (CompPlugin::screenInitPlugins (this));
4555
4556 /* Wait for old window manager to go away */4463 /* Wait for old window manager to go away */
4557 if (currentWmSnOwner != None)4464 if (currentWmSnOwner != None)
4558 {4465 {
@@ -4615,6 +4522,82 @@
4615 return false;4522 return false;
4616 }4523 }
46174524
4525 for (i = 0; i < SCREEN_EDGE_NUM; i++)
4526 {
4527 priv->screenEdge[i].id = None;
4528 priv->screenEdge[i].count = 0;
4529 }
4530
4531 priv->screenNum = DefaultScreen (dpy);
4532 priv->colormap = DefaultColormap (dpy, priv->screenNum);
4533 priv->root = root;
4534
4535 priv->snContext = sn_monitor_context_new (priv->snDisplay, priv->screenNum,
4536 compScreenSnEvent, this, NULL);
4537
4538 priv->wmSnSelectionWindow = newWmSnOwner;
4539 priv->wmSnAtom = wmSnAtom;
4540 priv->wmSnTimestamp = wmSnTimestamp;
4541
4542 if (!XGetWindowAttributes (dpy, priv->root, &priv->attrib))
4543 return false;
4544
4545 priv->workArea.setWidth (priv->attrib.width);
4546 priv->workArea.setHeight (priv->attrib.height);
4547
4548 priv->grabWindow = None;
4549
4550 templ.visualid = XVisualIDFromVisual (priv->attrib.visual);
4551
4552 visinfo = XGetVisualInfo (dpy, VisualIDMask, &templ, &nvisinfo);
4553 if (!nvisinfo)
4554 {
4555 compLogMessage ("core", CompLogLevelFatal,
4556 "Couldn't get visual info for default visual");
4557 return false;
4558 }
4559
4560 black.red = black.green = black.blue = 0;
4561
4562 if (!XAllocColor (dpy, priv->colormap, &black))
4563 {
4564 compLogMessage ("core", CompLogLevelFatal,
4565 "Couldn't allocate color");
4566 XFree (visinfo);
4567 return false;
4568 }
4569
4570 bitmap = XCreateBitmapFromData (dpy, priv->root, &data, 1, 1);
4571 if (!bitmap)
4572 {
4573 compLogMessage ("core", CompLogLevelFatal,
4574 "Couldn't create bitmap");
4575 XFree (visinfo);
4576 return false;
4577 }
4578
4579 priv->invisibleCursor = XCreatePixmapCursor (dpy, bitmap, bitmap,
4580 &black, &black, 0, 0);
4581 if (!priv->invisibleCursor)
4582 {
4583 compLogMessage ("core", CompLogLevelFatal,
4584 "Couldn't create invisible cursor");
4585 XFree (visinfo);
4586 return false;
4587 }
4588
4589 XFreePixmap (dpy, bitmap);
4590 XFreeColors (dpy, priv->colormap, &black.pixel, 1, 0);
4591
4592 XFree (visinfo);
4593
4594 priv->reshape (priv->attrib.width, priv->attrib.height);
4595
4596 priv->detectOutputDevices ();
4597 priv->updateOutputDevices ();
4598
4599 priv->getDesktopHints ();
4600
4618 attrib.override_redirect = 1;4601 attrib.override_redirect = 1;
4619 attrib.event_mask = PropertyChangeMask;4602 attrib.event_mask = PropertyChangeMask;
46204603
@@ -4731,46 +4714,25 @@
4731 focusDefaultWindow ();4714 focusDefaultWindow ();
4732 }4715 }
47334716
4734 /* Dispatch any queued timers */4717 /* Need to set a default here so that the value isn't uninitialized
4735 while (TimeoutHandler::Default ()->timers ().begin () != TimeoutHandler::Default ()->timers ().end ())4718 * when loading plugins FIXME: Should find a way to initialize options
4736 {4719 * first and then set this value, or better yet, tie this value directly
4737 if (TimeoutHandler::Default ()->timers ().front ()->minLeft () <= 0)4720 * to the option */
4738 {4721 priv->vpSize.setWidth (priv->optionGetHsize ());
4739 CompTimer *t = TimeoutHandler::Default ()->timers ().front ();4722 priv->vpSize.setHeight (priv->optionGetVsize ());
4740 TimeoutHandler::Default ()->timers ().pop_front ();4723
47414724 priv->initialized = true;
4742 t->setActive (false);4725
4743 if (t->triggerCallback ())4726 /* TODO: Bailout properly when screenInitPlugins fails
4744 {4727 * TODO: It would be nicer if this line could mean
4745 TimeoutHandler::Default ()->addTimer (t);4728 * "init all the screens", but unfortunately it only inits
4746 t->setActive (true);4729 * plugins loaded on the command line screen's and then
4747 }4730 * we need to call updatePlugins () to init the remaining
4748 }4731 * screens from option changes */
4749 else4732 assert (CompPlugin::screenInitPlugins (this));
4750 break;4733
4751 }4734 /* The active plugins list might have been changed - load any
47524735 * new plugins */
4753 if (priv->dirtyPluginList)
4754 priv->updatePlugins ();
4755
4756 /* Dispatch any queued timers */
4757 while (TimeoutHandler::Default ()->timers ().begin () != TimeoutHandler::Default ()->timers ().end ())
4758 {
4759 if (TimeoutHandler::Default ()->timers ().front ()->minLeft () <= 0)
4760 {
4761 CompTimer *t = TimeoutHandler::Default ()->timers ().front ();
4762 TimeoutHandler::Default ()->timers ().pop_front ();
4763
4764 t->setActive (false);
4765 if (t->triggerCallback ())
4766 {
4767 TimeoutHandler::Default ()->addTimer (t);
4768 t->setActive (true);
4769 }
4770 }
4771 else
4772 break;
4773 }
47744736
4775 priv->vpSize.setWidth (priv->optionGetHsize ());4737 priv->vpSize.setWidth (priv->optionGetHsize ());
4776 priv->vpSize.setHeight (priv->optionGetVsize ());4738 priv->vpSize.setHeight (priv->optionGetVsize ());
@@ -4799,6 +4761,9 @@
4799 while (!priv->windows.empty ())4761 while (!priv->windows.empty ())
4800 delete priv->windows.front ();4762 delete priv->windows.front ();
48014763
4764 while ((p = CompPlugin::pop ()))
4765 CompPlugin::unload (p);
4766
4802 XUngrabKey (priv->dpy, AnyKey, AnyModifier, priv->root);4767 XUngrabKey (priv->dpy, AnyKey, AnyModifier, priv->root);
48034768
4804 priv->initialized = false;4769 priv->initialized = false;
@@ -4822,14 +4787,6 @@
4822 if (priv->snDisplay)4787 if (priv->snDisplay)
4823 sn_display_unref (priv->snDisplay);4788 sn_display_unref (priv->snDisplay);
48244789
4825 /* Remove our selection */
4826 XSelectInput (priv->dpy, priv->root, NoEventMask);
4827 XDestroyWindow (screen->dpy (), priv->wmSnSelectionWindow);
4828 XSync (screen->dpy (), FALSE);
4829
4830 while ((p = CompPlugin::pop ()))
4831 CompPlugin::unload (p);
4832
4833 XSync (priv->dpy, False);4790 XSync (priv->dpy, False);
4834 XCloseDisplay (priv->dpy);4791 XCloseDisplay (priv->dpy);
48354792
48364793
=== modified file 'src/window.cpp'
--- src/window.cpp 2011-10-11 09:36:19 +0000
+++ src/window.cpp 2011-10-15 07:07:10 +0000
@@ -6517,7 +6517,7 @@
6517 priv->desktop = screen->currentDesktop ();6517 priv->desktop = screen->currentDesktop ();
65186518
6519 screen->setWindowProp (priv->id, Atoms::winDesktop,6519 screen->setWindowProp (priv->id, Atoms::winDesktop,
6520 priv->desktop);6520 priv->desktop);
6521 }6521 }
6522 }6522 }
6523 }6523 }

Subscribers

People subscribed via source and target branches