diff options
author | fluxgen <fluxgen> | 2002-03-23 15:14:45 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-03-23 15:14:45 (GMT) |
commit | 8daa080d11a6bf9e6ed208563e738a02c9eb6cf8 (patch) | |
tree | 4d9f68180a4bc0f1574f03b48897233b43791899 /src/Window.cc | |
parent | e133cf83a332a72ca42be5e223834d4e6aa0a2e8 (diff) | |
download | fluxbox_pavel-8daa080d11a6bf9e6ed208563e738a02c9eb6cf8.zip fluxbox_pavel-8daa080d11a6bf9e6ed208563e738a02c9eb6cf8.tar.bz2 |
some signed/unsigned stuff
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/Window.cc b/src/Window.cc index c74f101..bbeb640 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Window.cc,v 1.34 2002/03/19 14:30:42 fluxgen Exp $ | 25 | // $Id: Window.cc,v 1.35 2002/03/23 15:14:45 fluxgen Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -411,9 +411,11 @@ FluxboxWindow::~FluxboxWindow(void) { | |||
411 | XUngrabPointer(display, CurrentTime); | 411 | XUngrabPointer(display, CurrentTime); |
412 | } | 412 | } |
413 | 413 | ||
414 | if (workspace_number != -1 && window_number != -1) | 414 | if (!iconic) { |
415 | screen->getWorkspace(workspace_number)->removeWindow(this); | 415 | Workspace *workspace = screen->getWorkspace(workspace_number); |
416 | else if (iconic) | 416 | if (workspace) |
417 | workspace->removeWindow(this); | ||
418 | } else //it's iconic | ||
417 | screen->removeIcon(this); | 419 | screen->removeIcon(this); |
418 | 420 | ||
419 | if (windowmenu) | 421 | if (windowmenu) |
@@ -2022,9 +2024,9 @@ void FluxboxWindow::iconify(void) { | |||
2022 | 2024 | ||
2023 | 2025 | ||
2024 | void FluxboxWindow::deiconify(bool reassoc, bool raise) { | 2026 | void FluxboxWindow::deiconify(bool reassoc, bool raise) { |
2025 | if (iconic || reassoc) | 2027 | if (iconic || reassoc) { |
2026 | screen->reassociateWindow(this, -1, false); | 2028 | screen->reassociateWindow(this, screen->getCurrentWorkspace()->getWorkspaceID(), false); |
2027 | else if (workspace_number != screen->getCurrentWorkspace()->getWorkspaceID()) | 2029 | } else if (workspace_number != screen->getCurrentWorkspace()->getWorkspaceID()) |
2028 | return; | 2030 | return; |
2029 | 2031 | ||
2030 | setState(NormalState); | 2032 | setState(NormalState); |
@@ -2443,7 +2445,7 @@ void FluxboxWindow::stick(void) { | |||
2443 | stuck = false; | 2445 | stuck = false; |
2444 | 2446 | ||
2445 | if (! iconic) | 2447 | if (! iconic) |
2446 | screen->reassociateWindow(this, -1, true); | 2448 | screen->reassociateWindow(this, screen->getCurrentWorkspace()->getWorkspaceID(), true); |
2447 | 2449 | ||
2448 | 2450 | ||
2449 | } else { | 2451 | } else { |
@@ -2712,8 +2714,8 @@ void FluxboxWindow::restoreAttributes(void) { | |||
2712 | current_state = save_state; | 2714 | current_state = save_state; |
2713 | } | 2715 | } |
2714 | 2716 | ||
2715 | if (((int) blackbox_attrib.workspace != screen->getCurrentWorkspaceID()) && | 2717 | if (( blackbox_attrib.workspace != screen->getCurrentWorkspaceID()) && |
2716 | ((int) blackbox_attrib.workspace < screen->getCount())) { | 2718 | ( blackbox_attrib.workspace < screen->getCount())) { |
2717 | screen->reassociateWindow(this, blackbox_attrib.workspace, true); | 2719 | screen->reassociateWindow(this, blackbox_attrib.workspace, true); |
2718 | 2720 | ||
2719 | if (current_state == NormalState) current_state = WithdrawnState; | 2721 | if (current_state == NormalState) current_state = WithdrawnState; |
@@ -3675,10 +3677,10 @@ void FluxboxWindow::changeBlackboxHints(BaseDisplay::BlackboxHints *net) { | |||
3675 | stick(); | 3677 | stick(); |
3676 | 3678 | ||
3677 | if ((net->flags & BaseDisplay::ATTRIB_WORKSPACE) && | 3679 | if ((net->flags & BaseDisplay::ATTRIB_WORKSPACE) && |
3678 | (workspace_number != (signed) net->workspace)) { | 3680 | (workspace_number != net->workspace)) { |
3679 | screen->reassociateWindow(this, net->workspace, true); | 3681 | screen->reassociateWindow(this, net->workspace, true); |
3680 | 3682 | ||
3681 | if (screen->getCurrentWorkspaceID() != (signed) net->workspace) | 3683 | if (screen->getCurrentWorkspaceID() != net->workspace) |
3682 | withdraw(); | 3684 | withdraw(); |
3683 | else | 3685 | else |
3684 | deiconify(); | 3686 | deiconify(); |