diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-19 07:08:17 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-19 07:08:17 (GMT) |
commit | c381a130eb044f3ea643dcd864be5732f14f8014 (patch) | |
tree | 0a8917ca31c724bf30e1cadc70b27cf841754e7d /src | |
parent | a21572f1b1b8d58cd5d7bb0117924b9f3879fb9a (diff) | |
download | fluxbox_paul-c381a130eb044f3ea643dcd864be5732f14f8014.zip fluxbox_paul-c381a130eb044f3ea643dcd864be5732f14f8014.tar.bz2 |
remove reassoc argument from FluxboxWindow::deiconify
Diffstat (limited to 'src')
-rw-r--r-- | src/FbCommands.cc | 4 | ||||
-rw-r--r-- | src/Gnome.cc | 2 | ||||
-rw-r--r-- | src/Window.cc | 60 | ||||
-rw-r--r-- | src/Window.hh | 3 |
4 files changed, 26 insertions, 43 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 747eb3c..479c5c8 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -534,7 +534,7 @@ void DeiconifyCmd::execute() { | |||
534 | (*it)->isStuck()) { | 534 | (*it)->isStuck()) { |
535 | if (m_dest == ORIGIN || m_dest == ORIGINQUIET) | 535 | if (m_dest == ORIGIN || m_dest == ORIGINQUIET) |
536 | screen->sendToWorkspace(old_workspace_num, (*it), change_ws); | 536 | screen->sendToWorkspace(old_workspace_num, (*it), change_ws); |
537 | (*it)->deiconify(false); | 537 | (*it)->deiconify(); |
538 | } | 538 | } |
539 | } | 539 | } |
540 | break; | 540 | break; |
@@ -550,7 +550,7 @@ void DeiconifyCmd::execute() { | |||
550 | m_mode != LASTWORKSPACE) | 550 | m_mode != LASTWORKSPACE) |
551 | screen->sendToWorkspace(old_workspace_num, (*it), change_ws); | 551 | screen->sendToWorkspace(old_workspace_num, (*it), change_ws); |
552 | else | 552 | else |
553 | (*it)->deiconify(false); | 553 | (*it)->deiconify(); |
554 | break; | 554 | break; |
555 | } | 555 | } |
556 | } | 556 | } |
diff --git a/src/Gnome.cc b/src/Gnome.cc index 5bdb986..e570526 100644 --- a/src/Gnome.cc +++ b/src/Gnome.cc | |||
@@ -396,7 +396,7 @@ void Gnome::setState(FluxboxWindow *win, int state) { | |||
396 | if (win->isIconic()) | 396 | if (win->isIconic()) |
397 | win->iconify(); | 397 | win->iconify(); |
398 | } else if (win->isIconic()) | 398 | } else if (win->isIconic()) |
399 | win->deiconify(true, true); | 399 | win->deiconify(true); |
400 | 400 | ||
401 | if (state & WIN_STATE_SHADED) { | 401 | if (state & WIN_STATE_SHADED) { |
402 | #ifdef DEBUG | 402 | #ifdef DEBUG |
diff --git a/src/Window.cc b/src/Window.cc index c48a6ff..125347b 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -545,7 +545,7 @@ void FluxboxWindow::init() { | |||
545 | iconify(); | 545 | iconify(); |
546 | } else if (m_workspace_number == screen().currentWorkspaceID()) { | 546 | } else if (m_workspace_number == screen().currentWorkspaceID()) { |
547 | iconic = true; | 547 | iconic = true; |
548 | deiconify(false); | 548 | deiconify(); |
549 | // check if we should prevent this window from gaining focus | 549 | // check if we should prevent this window from gaining focus |
550 | if (!allowsFocusFromClient() || Fluxbox::instance()->isStartup()) | 550 | if (!allowsFocusFromClient() || Fluxbox::instance()->isStartup()) |
551 | m_focused = false; | 551 | m_focused = false; |
@@ -1416,57 +1416,41 @@ void FluxboxWindow::iconify() { | |||
1416 | // focus revert is done elsewhere (based on signal) | 1416 | // focus revert is done elsewhere (based on signal) |
1417 | } | 1417 | } |
1418 | 1418 | ||
1419 | void FluxboxWindow::deiconify(bool reassoc, bool do_raise) { | 1419 | void FluxboxWindow::deiconify(bool do_raise) { |
1420 | if (numClients() == 0) | 1420 | if (numClients() == 0 || !iconic || oplock) |
1421 | return; | 1421 | return; |
1422 | 1422 | ||
1423 | if (oplock) return; | ||
1424 | oplock = true; | 1423 | oplock = true; |
1425 | 1424 | ||
1426 | if (iconic && | 1425 | // reassociate first, so it gets removed from screen's icon list |
1427 | m_workspace_number != screen().currentWorkspace()->workspaceID()) { | 1426 | screen().reassociateWindow(this, m_workspace_number, false); |
1428 | // reassociate first, so it gets removed from screen's icon list | ||
1429 | screen().reassociateWindow(this, m_workspace_number, false); | ||
1430 | iconic = false; | ||
1431 | return; | ||
1432 | } | ||
1433 | |||
1434 | if (iconic || reassoc) | ||
1435 | screen().reassociateWindow(this, screen().currentWorkspaceID(), false); | ||
1436 | else if (moving || m_workspace_number != screen().currentWorkspaceID()) { | ||
1437 | oplock = false; | ||
1438 | return; | ||
1439 | } | ||
1440 | |||
1441 | bool was_iconic = iconic; | ||
1442 | |||
1443 | iconic = false; | 1427 | iconic = false; |
1444 | m_statesig.notify(); | 1428 | m_statesig.notify(); |
1445 | 1429 | ||
1446 | if (reassoc && !m_client->transients.empty()) { | 1430 | // deiconify all transients |
1447 | // deiconify all transients | 1431 | ClientList::iterator client_it = clientList().begin(); |
1448 | ClientList::iterator client_it = clientList().begin(); | 1432 | ClientList::iterator client_it_end = clientList().end(); |
1449 | ClientList::iterator client_it_end = clientList().end(); | 1433 | for (; client_it != client_it_end; ++client_it) { |
1450 | for (; client_it != client_it_end; ++client_it) { | 1434 | WinClient::TransientList::iterator trans_it = |
1451 | //TODO: Can this get stuck in a loop? | 1435 | (*client_it)->transientList().begin(); |
1452 | WinClient::TransientList::iterator trans_it = | 1436 | WinClient::TransientList::iterator trans_it_end = |
1453 | (*client_it)->transientList().begin(); | 1437 | (*client_it)->transientList().end(); |
1454 | WinClient::TransientList::iterator trans_it_end = | 1438 | for (; trans_it != trans_it_end; ++trans_it) { |
1455 | (*client_it)->transientList().end(); | 1439 | if ((*trans_it)->fbwindow()) |
1456 | for (; trans_it != trans_it_end; ++trans_it) { | 1440 | (*trans_it)->fbwindow()->deiconify(false); |
1457 | if ((*trans_it)->fbwindow()) | ||
1458 | (*trans_it)->fbwindow()->deiconify(true, false); | ||
1459 | } | ||
1460 | } | 1441 | } |
1461 | } | 1442 | } |
1462 | 1443 | ||
1444 | if (m_workspace_number != screen().currentWorkspaceID()) | ||
1445 | return; | ||
1446 | |||
1463 | show(); | 1447 | show(); |
1464 | 1448 | ||
1465 | // focus new, OR if it's the only window on the workspace | 1449 | // focus new, OR if it's the only window on the workspace |
1466 | // but not on startup: focus will be handled after creating everything | 1450 | // but not on startup: focus will be handled after creating everything |
1467 | // we use m_focused as a signal to focus the window when mapped | 1451 | // we use m_focused as a signal to focus the window when mapped |
1468 | if (was_iconic && (screen().currentWorkspace()->numberOfWindows() == 1 || | 1452 | if (screen().currentWorkspace()->numberOfWindows() == 1 || |
1469 | screen().focusControl().focusNew() || m_client->isTransient())) | 1453 | screen().focusControl().focusNew() || m_client->isTransient()) |
1470 | m_focused = true; | 1454 | m_focused = true; |
1471 | 1455 | ||
1472 | oplock = false; | 1456 | oplock = false; |
@@ -2231,7 +2215,7 @@ void FluxboxWindow::mapRequestEvent(XMapRequestEvent &re) { | |||
2231 | return; | 2215 | return; |
2232 | 2216 | ||
2233 | setCurrentClient(*client, false); // focus handled on MapNotify | 2217 | setCurrentClient(*client, false); // focus handled on MapNotify |
2234 | deiconify(false); | 2218 | deiconify(); |
2235 | 2219 | ||
2236 | } | 2220 | } |
2237 | 2221 | ||
diff --git a/src/Window.hh b/src/Window.hh index d2529bc..821e86a 100644 --- a/src/Window.hh +++ b/src/Window.hh | |||
@@ -256,10 +256,9 @@ public: | |||
256 | void iconify(); | 256 | void iconify(); |
257 | /** | 257 | /** |
258 | * Deiconify window | 258 | * Deiconify window |
259 | * @param reassoc reassociate the window to the current workspace | ||
260 | * @param do_raise raise the window when its been deiconfied | 259 | * @param do_raise raise the window when its been deiconfied |
261 | */ | 260 | */ |
262 | void deiconify(bool reassoc = true, bool do_raise = true); | 261 | void deiconify(bool do_raise = true); |
263 | 262 | ||
264 | // ------------------ | 263 | // ------------------ |
265 | // Per window transparency addons | 264 | // Per window transparency addons |