summaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-07-30 07:29:36 +0000
committerDana Jansens <danakj@orodu.net>2002-07-30 07:29:36 +0000
commit25a18140fad2f111ce681cef90be6c13ae6e8996 (patch)
tree737db04885620d26c3120c80c17647d062211e86 /src/Window.cc
parenta7515b6d85b9cdb97d2365559109af74e68f6ff8 (diff)
remove sticky windows from other workspaces when unsticking. stop the abuse of stick()! dont just re-call it!
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Window.cc b/src/Window.cc
index cd8716e0..8b78d85e 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -316,9 +316,8 @@ BlackboxWindow::BlackboxWindow(Blackbox *b, Window w, BScreen *s) {
// get sticky state from our parent window if we've got one
if (isTransient() && client.transient_for != (BlackboxWindow *) ~0ul &&
client.transient_for->isStuck() != flags.stuck)
- stick();
+ flags.stuck = True;
- // the following flags are set by blackbox native apps only
if (flags.shaded) {
flags.shaded = False;
initial_state = current_state;
@@ -1941,6 +1940,10 @@ void BlackboxWindow::stick(void) {
blackbox_attrib.attrib ^= AttribOmnipresent;
flags.stuck = False;
+
+ for (unsigned int i = 0; i < screen->getNumberOfWorkspaces(); ++i)
+ if (i != blackbox_attrib.workspace)
+ screen->getWorkspace(i)->removeWindow(this, True);
if (! flags.iconic)
screen->reassociateWindow(this, BSENTINEL, True);
@@ -2224,8 +2227,8 @@ void BlackboxWindow::restoreAttributes(void) {
current_state = NormalState;
}
- if (net->flags & AttribOmnipresent && net->attrib & AttribOmnipresent) {
- flags.stuck = False;
+ if (net->flags & AttribOmnipresent && net->attrib & AttribOmnipresent &&
+ ! flags.stuck) {
stick();
// if the window was on another workspace, it was going to be hidden. this