all repos — openbox @ db3e93a3c1a57d962741a572a0913ce2555d9dba

openbox fork - make it a bit more like ryudo

actually check if a window has the function flags approproate before trying to perform an action. (i.e. dont let windows iconify if they arent supposed to, etc)
Dana Jansens danakj@orodu.net
commit

db3e93a3c1a57d962741a572a0913ce2555d9dba

parent

45863e605c2dc7d605293331c26f688305c45fac

1 files changed, 12 insertions(+), 3 deletions(-)

jump to
M src/Window.ccsrc/Window.cc

@@ -1668,7 +1668,7 @@ }

void BlackboxWindow::iconify(void) { - if (flags.iconic) return; + if (flags.iconic || ! (functions & Func_Iconify)) return; // We don't need to worry about resizing because resizing always grabs the X // server. This should only ever happen if using opaque moving.

@@ -1772,6 +1772,8 @@ }

void BlackboxWindow::close(void) { + if (! (functions & Func_Close)) return; + XEvent ce; ce.xclient.type = ClientMessage; ce.xclient.message_type = xatom->getAtom(XAtom::wm_protocols);

@@ -1817,6 +1819,8 @@ }

void BlackboxWindow::maximize(unsigned int button) { + if (! (functions & Func_Maximize)) return; + // We don't need to worry about resizing because resizing always grabs the X // server. This should only ever happen if using opaque moving. if (flags.moving)

@@ -3017,6 +3021,8 @@

void BlackboxWindow::beginMove(int x_root, int y_root) { + if (! (functions & Func_Move)) return; + assert(! (flags.resizing || flags.moving)); /*

@@ -3478,11 +3484,14 @@ }

void BlackboxWindow::beginResize(int x_root, int y_root, Corner dir) { + if (! (functions & Func_Resize)) return; + assert(! (flags.resizing || flags.moving)); /* - Only one window can be moved/resized at a time. If another window is already - being moved or resized, then stop it before whating to work with this one. + Only one window can be moved/resized at a time. If another window is + already being moved or resized, then stop it before whating to work with + this one. */ BlackboxWindow *changing = blackbox->getChangingWindow(); if (changing && changing != this) {