diff options
Diffstat (limited to 'src/screen.cpp')
-rw-r--r-- | src/screen.cpp | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/src/screen.cpp b/src/screen.cpp index 86ca65a..aad1411 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -1191,6 +1191,9 @@ void PrivateScreen::setWmState (int state, Window id) { unsigned long data[2]; + + if (zcomp) + return; data[0] = state; data[1] = None; @@ -1291,11 +1294,15 @@ PrivateScreen::getWindowState (Window id) return state; } + void PrivateScreen::setWindowState (unsigned int state, Window id) { Atom data[32]; int i = 0; + + if (zcomp) + return; if (state & CompWindowStateModalMask) data[i++] = Atoms::winStateModal; @@ -4100,6 +4107,7 @@ CompScreen::init (const char *name) unsigned int nchildren; int defaultDepth, nvisinfo; XSetWindowAttributes attrib; + int inputMask; CompOption::Value::Vector vList; @@ -4196,6 +4204,11 @@ CompScreen::init (const char *name) wmSnAtom = XInternAtom (dpy, buf, 0); currentWmSnOwner = XGetSelectionOwner (dpy, wmSnAtom); + + root = XRootWindow (dpy, DefaultScreen (dpy)); + + if (zcomp) + goto select_input; if (currentWmSnOwner != None) { @@ -4214,8 +4227,6 @@ CompScreen::init (const char *name) XSelectInput (dpy, currentWmSnOwner, StructureNotifyMask); } - root = XRootWindow (dpy, DefaultScreen (dpy)); - attr.override_redirect = true; attr.event_mask = PropertyChangeMask; #define PACKAGE "compiz_aaaaaaaaaaaaaaaaa" @@ -4268,24 +4279,31 @@ CompScreen::init (const char *name) XWindowEvent (dpy, currentWmSnOwner, StructureNotifyMask, &event); } while (event.type != DestroyNotify); } + +select_input: CompScreen::checkForError (dpy); XGrabServer (dpy); - - XSelectInput (dpy, root, - SubstructureRedirectMask | - SubstructureNotifyMask | + + inputMask = SubstructureNotifyMask | StructureNotifyMask | PropertyChangeMask | LeaveWindowMask | EnterWindowMask | - KeyPressMask | - KeyReleaseMask | - ButtonPressMask | - ButtonReleaseMask | FocusChangeMask | - ExposureMask); + ExposureMask; + + if (!zcomp) + { + inputMask |= SubstructureRedirectMask; + inputMask |= KeyPressMask; + inputMask |= KeyReleaseMask; + inputMask |= ButtonPressMask; + inputMask |= ButtonReleaseMask; + } + + XSelectInput (dpy, root, inputMask); if (CompScreen::checkForError (dpy)) { |