~ubuntu-branches/ubuntu/oneiric/compiz/oneiric

« back to all changes in this revision

Viewing changes to plugins/move/src/move.cpp

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2011-09-28 14:15:21 UTC
  • mfrom: (0.168.12 upstream)
  • Revision ID: package-import@ubuntu.com-20110928141521-sf8s523pqyptq61f
Tags: 1:0.9.6-0ubuntu1
* New upstream release 0.9.6:
 - Windows which are marked transients of docks should be treated like docks (LP: #860397)
 - Applications which create multiple windows that are transients of each other can be given invalid stack positions (LP: #858625)
 - race condition in configureXWindow causes unpredicatable window geometry changes (LP: #860304)
 - invisible window when a window is mapped but not yet drawn on by the process mapping it (LP: #860286)
 - resizing bugs with xterm (LP: #854725)
 - Cannot open a window that starts iconified (LP: #732997)
 - maximized windows fail to update their input extents when undecorated (LP: #853734)
 - Clicking on a tweet/message link sometimes does not work (LP: #790565)
 - crash on closing a window (LP: #856015)
 - Windows move to 0,0 on compiz restarts (LP: #858629)
 - windows that are decorated while resizing can cause incorrect resize results (LP: #860306)
 - remove transient window handling from unity-window-decorator (LP: #856096)

Show diffs side-by-side

added added

removed removed

Lines of Context:
314
314
 
315
315
        w = ms->w;
316
316
 
317
 
        wX      = w->serverGeometry ().x ();
318
 
        wY      = w->serverGeometry ().y ();
319
 
        wWidth  = w->serverGeometry ().width () +
320
 
                  w->serverGeometry ().border () * 2;
321
 
        wHeight = w->serverGeometry ().height () +
322
 
                  w->serverGeometry ().border () * 2;
 
317
        wX      = w->geometry ().x ();
 
318
        wY      = w->geometry ().y ();
 
319
        wWidth  = w->geometry ().width () +
 
320
                  w->geometry ().border () * 2;
 
321
        wHeight = w->geometry ().height () +
 
322
                  w->geometry ().border () * 2;
323
323
 
324
324
        ms->x += xRoot - lastPointerX;
325
325
        ms->y += yRoot - lastPointerY;
488
488
                     wY + dy - w->geometry ().y (), false);
489
489
 
490
490
            if (ms->optionGetLazyPositioning () &&
491
 
                MoveScreen::get (screen)->hasCompositing)
 
491
                ms->hasCompositing &&
 
492
                !MoveWindow::get (ms->w)->mLocked)
492
493
            {
493
494
                /* FIXME: This form of lazy positioning is broken and should
494
495
                   be replaced asap. Current code exists just to avoid a
507
508
    }
508
509
}
509
510
 
 
511
/* FIXME: This is a hack to prevent a race condition
 
512
 * when core is processing ConfigureNotify events. It
 
513
 * MUST be removed after 0.9.6 when we can break ABI
 
514
 * and do lazy positioning correctly ! */
 
515
 
 
516
void
 
517
MoveScreen::handleCompizEvent (const char *plugin, const char *event, CompOption::Vector &options)
 
518
{
 
519
    if (w)
 
520
    {
 
521
        if (std::string ("core") == std::string (plugin))
 
522
        {
 
523
            if (std::string ("lock_position") == std::string (event))
 
524
            {
 
525
                Window xid = CompOption::getIntOptionNamed (options, "window", 0);
 
526
                int    lock = CompOption::getIntOptionNamed (options, "active", 0);
 
527
 
 
528
                if (xid == w->id ())
 
529
                    MoveWindow::get (w)->mLocked = lock ? true : false;
 
530
            }
 
531
        }
 
532
    }
 
533
 
 
534
    screen->handleCompizEvent (plugin, event, options);
 
535
}
 
536
 
510
537
void
511
538
MoveScreen::handleEvent (XEvent *event)
512
539
{