}
if (decorations & Decor_Border) {
- frame.fborder_pixel = screen->getWindowStyle()->f_focus.pixel();
- frame.uborder_pixel = screen->getWindowStyle()->f_unfocus.pixel();
+ frame.fborder_pixel = screen->getWindowStyle()->f_focus.color().pixel();
+ frame.uborder_pixel = screen->getWindowStyle()->f_unfocus.color().pixel();
}
if (decorations & Decor_Handle) {
void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) {
- if (pe->state == PropertyDelete)
+ if (pe->state == PropertyDelete || ! validateClient())
return;
#if 0
assert(flags.moving);
assert(blackbox->getChangingWindow() == this);
- bool warp = False;
int dx = x_root - frame.grab_x, dy = y_root - frame.grab_y;
dx -= frame.border_w;
dy -= frame.border_w;
if (screen->doOpaqueMove()) {
if (screen->doWorkspaceWarping())
- warp = doWorkspaceWarping(x_root, y_root, dx, dy);
+ doWorkspaceWarping(x_root, y_root, dx);
configure(dx, dy, frame.rect.width(), frame.rect.height());
} else {
frame.changing.height() - 1);
if (screen->doWorkspaceWarping())
- warp = doWorkspaceWarping(x_root, y_root, dx, dy);
+ doWorkspaceWarping(x_root, y_root, dx);
frame.changing.setPos(dx, dy);
}
-bool BlackboxWindow::doWorkspaceWarping(int x_root, int y_root,
- int &dx, int dy) {
+void BlackboxWindow::doWorkspaceWarping(int x_root, int y_root, int &dx) {
// workspace warping
bool warp = False;
unsigned int dest = screen->getCurrentWorkspaceID();
else dest = 0;
}
if (! warp)
- return False;
+ return;
bool focus = flags.focused; // had focus while moving?
dx -= screen->getRect().width() - 1;
}
- /*
- We grab the X server here so that we dont end up magically grabbing
- a different window dring the warp.
- */
-
if (! flags.stuck)
screen->reassociateWindow(this, dest, False);
screen->changeWorkspaceID(dest);
+ if (screen->doOpaqueMove())
+ XGrabServer(blackbox->getXDisplay());
+
XUngrabPointer(blackbox->getXDisplay(), CurrentTime);
XWarpPointer(blackbox->getXDisplay(), None,
screen->getRootWindow(), 0, 0, 0, 0,
GrabModeAsync, GrabModeAsync,
None, blackbox->getMoveCursor(), CurrentTime);
+ if (screen->doOpaqueMove())
+ XUngrabServer(blackbox->getXDisplay());
+
if (focus)
setInputFocus();
- return True;
}