diff options
author | markt <markt> | 2007-10-24 17:09:26 (GMT) |
---|---|---|
committer | markt <markt> | 2007-10-24 17:09:26 (GMT) |
commit | f3afe787c1209cf1357493924a4f7eb7864def54 (patch) | |
tree | d0c0c3eca154ab538fbc1fb3c62081e9250c05bd /src/ScreenPlacement.cc | |
parent | 74eb584a312aba21b21eccb6c49ade1571aa3740 (diff) | |
download | fluxbox_pavel-f3afe787c1209cf1357493924a4f7eb7864def54.zip fluxbox_pavel-f3afe787c1209cf1357493924a4f7eb7864def54.tar.bz2 |
introduced workspacename for ClientPattern, and some miscellaneous cleanup
Diffstat (limited to 'src/ScreenPlacement.cc')
-rw-r--r-- | src/ScreenPlacement.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/ScreenPlacement.cc b/src/ScreenPlacement.cc index e8d1592..6d95860 100644 --- a/src/ScreenPlacement.cc +++ b/src/ScreenPlacement.cc | |||
@@ -58,8 +58,7 @@ ScreenPlacement::ScreenPlacement(BScreen &screen): | |||
58 | { | 58 | { |
59 | } | 59 | } |
60 | 60 | ||
61 | bool ScreenPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist, | 61 | bool ScreenPlacement::placeWindow(const FluxboxWindow &win, int head, |
62 | const FluxboxWindow &win, | ||
63 | int &place_x, int &place_y) { | 62 | int &place_x, int &place_y) { |
64 | 63 | ||
65 | 64 | ||
@@ -88,7 +87,6 @@ bool ScreenPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist, | |||
88 | } | 87 | } |
89 | 88 | ||
90 | // view (screen + head) constraints | 89 | // view (screen + head) constraints |
91 | int head = (signed) win.getOnHead(); | ||
92 | int head_left = (signed) win.screen().maxLeft(head); | 90 | int head_left = (signed) win.screen().maxLeft(head); |
93 | int head_right = (signed) win.screen().maxRight(head); | 91 | int head_right = (signed) win.screen().maxRight(head); |
94 | int head_top = (signed) win.screen().maxTop(head); | 92 | int head_top = (signed) win.screen().maxTop(head); |
@@ -100,9 +98,7 @@ bool ScreenPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist, | |||
100 | 98 | ||
101 | bool placed = false; | 99 | bool placed = false; |
102 | try { | 100 | try { |
103 | placed = m_strategy->placeWindow(windowlist, | 101 | placed = m_strategy->placeWindow(win, head, place_x, place_y); |
104 | win, | ||
105 | place_x, place_y); | ||
106 | } catch (std::bad_cast cast) { | 102 | } catch (std::bad_cast cast) { |
107 | // This should not happen. | 103 | // This should not happen. |
108 | // If for some reason we change the PlacementStrategy in Screen | 104 | // If for some reason we change the PlacementStrategy in Screen |
@@ -117,9 +113,7 @@ bool ScreenPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist, | |||
117 | if (m_fallback_strategy.get() == 0) | 113 | if (m_fallback_strategy.get() == 0) |
118 | m_fallback_strategy.reset(new CascadePlacement(win.screen())); | 114 | m_fallback_strategy.reset(new CascadePlacement(win.screen())); |
119 | 115 | ||
120 | m_fallback_strategy->placeWindow(windowlist, | 116 | m_fallback_strategy->placeWindow(win, head, place_x, place_y); |
121 | win, | ||
122 | place_x, place_y); | ||
123 | } | 117 | } |
124 | 118 | ||
125 | 119 | ||