~smspillaz/compiz-core/compiz-core.fix_953839

« back to all changes in this revision

Viewing changes to src/window.cpp

  • Committer: Daniel van Vugt
  • Author(s): Alan Griffiths
  • Date: 2012-03-12 07:58:01 UTC
  • mfrom: (3048.2.2 arg-tmp1)
  • Revision ID: daniel.van.vugt@canonical.com-20120312075801-abx9liy1n9p6q8il
Decouple GrabManager from rest of what was PrivateScreen

Show diffs side-by-side

added added

removed removed

Lines of Context:
5859
5859
        return;
5860
5860
 
5861
5861
    /* Ungrab everything */
5862
 
    XUngrabButton (screen->priv->dpy, AnyButton, AnyModifier, frame);
 
5862
    XUngrabButton (screen->dpy(), AnyButton, AnyModifier, frame);
5863
5863
 
5864
5864
    /* We don't need the full grab in the following cases:
5865
5865
     * - This window has the focus and either
5889
5889
 
5890
5890
    if (onlyActions)
5891
5891
    {
5892
 
        using compiz::private_screen::ButtonGrab;
5893
 
        /* Grab only we have bindings on */
5894
 
        foreach (ButtonGrab &bind, screen->priv->buttonGrabs)
5895
 
        {
5896
 
            unsigned int mods = modHandler->virtualToRealModMask (bind.modifiers);
5897
 
 
5898
 
            if (mods & CompNoMask)
5899
 
                continue;
5900
 
 
5901
 
            for (unsigned int ignore = 0;
5902
 
                     ignore <= modHandler->ignoredModMask (); ignore++)
5903
 
            {
5904
 
                if (ignore & ~modHandler->ignoredModMask ())
5905
 
                    continue;
5906
 
 
5907
 
                XGrabButton (screen->priv->dpy,
5908
 
                             bind.button,
5909
 
                             mods | ignore,
5910
 
                             serverFrame,
5911
 
                             false,
5912
 
                             ButtonPressMask | ButtonReleaseMask |
5913
 
                                ButtonMotionMask,
5914
 
                             GrabModeSync,
5915
 
                             GrabModeAsync,
5916
 
                             None,
5917
 
                             None);
5918
 
            }
5919
 
        }
 
5892
        screen->priv->updatePassiveButtonGrabs(serverFrame);
5920
5893
    }
5921
5894
    else
5922
5895
    {
5923
5896
        /* Grab everything */
5924
 
        XGrabButton (screen->priv->dpy,
 
5897
        XGrabButton (screen->dpy(),
5925
5898
                     AnyButton,
5926
5899
                     AnyModifier,
5927
5900
                     serverFrame, false,