void OpenboxWindow::iconify(void) {
if (flags.iconic) return;
+ if (flags.moving)
+ endMove();
+
if (windowmenu) windowmenu->hide();
setState(IconicState);
void OpenboxWindow::mapRequestEvent(XMapRequestEvent *re) {
+ cout << "MAP REQUEST " << client.window << " " << client.title << endl;
if (re->window == client.window) {
#ifdef DEBUG
fprintf(stderr, i18n->getMessage(WindowSet, WindowMapRequest,
mx = be->x_root - windowmenu->getWidth() / 2;
if (be->window == frame.title || be->window == frame.label) {
my = frame.y + frame.title_h;
- } else if (be->window = frame.handle) {
+ } else if (be->window == frame.handle) {
my = frame.y + frame.y_handle - windowmenu->getHeight();
} else { // (be->window == frame.window)
if (be->y <= (signed) frame.bevel_w) {
}
frame.grab_x = x - frame.x - frame.border_w;
frame.grab_y = y - frame.y - frame.border_w;
+ cout << "START MOVE " << client.window << " " << client.title << endl;
}
}
screen->hideGeometry();
XUngrabPointer(display, CurrentTime);
+ // if there are any left over motions from the move, drop them now cuz they
+ // cause problems
+ XEvent e;
+ while (XCheckTypedWindowEvent(display, frame.window, MotionNotify, &e));
+ cout << "END MOVE " << client.window << " " << client.title << endl;
}
else if (functions.resize &&
(((me->state & Button1Mask) && (me->window == frame.right_grip ||
me->window == frame.left_grip)) ||
- (me->state & (Mod1Mask | Button3Mask) &&
+ (me->state == (Mod1Mask | Button3Mask) &&
me->window == frame.window))) {
Bool left = resize_zone & ZoneLeft;
if (! flags.resizing) {
+ cout << "START RESIZE " << client.window << " " << client.title << endl;
Cursor cursor;
if (resize_zone & ZoneTop)
cursor = (resize_zone & ZoneLeft) ?
screen->showGeometry(gx, gy);
}
- }
+ } else
+ cout << "MOTION " << client.window << " " << client.title << endl;
}
default:
case DecorNormal:
- decorations.titlebar = decorations.border = decorations.handle =
- decorations.iconify = decorations.maximize = decorations.menu = True;
+ decorations.titlebar = decorations.iconify = decorations.menu =
+ decorations.border = True;
+ decorations.handle = (functions.resize && !flags.transient);
+ decorations.maximize = functions.maximize;
break;
case DecorTiny:
decorations.titlebar = decorations.iconify = decorations.menu = True;
- decorations.border = decorations.handle = decorations.maximize = False;
-
+ decorations.border = decorations.border = decorations.handle = False;
+ decorations.maximize = functions.maximize;
+
break;
case DecorTool:
- decorations.titlebar = decorations.menu = functions.move = True;
- decorations.iconify = decorations.border = decorations.handle =
- decorations.maximize = False;
+ decorations.titlebar = decorations.menu = True;
+ decorations.iconify = decorations.border = False;
+ decorations.handle = (functions.resize && !flags.transient);
+ decorations.maximize = functions.maximize;
break;
}