diff options
author | fluxgen <fluxgen> | 2003-12-19 00:48:41 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-12-19 00:48:41 (GMT) |
commit | 3999aded8c6b7f4efa758750d031cf5ef283ce7d (patch) | |
tree | 48c1790b68ca909670fd48cfff67c6c0100283aa /src/FbCommands.cc | |
parent | 0c8e6164920107bc612015269a50aed17f0feeae (diff) | |
download | fluxbox_pavel-3999aded8c6b7f4efa758750d031cf5ef283ce7d.zip fluxbox_pavel-3999aded8c6b7f4efa758750d031cf5ef283ce7d.tar.bz2 |
cleaning
Diffstat (limited to 'src/FbCommands.cc')
-rw-r--r-- | src/FbCommands.cc | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 7372b6a..1bec59a 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: FbCommands.cc,v 1.18 2003/12/03 22:13:21 fluxgen Exp $ | 22 | // $Id: FbCommands.cc,v 1.19 2003/12/19 00:47:30 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbCommands.hh" | 24 | #include "FbCommands.hh" |
25 | #include "fluxbox.hh" | 25 | #include "fluxbox.hh" |
@@ -115,27 +115,25 @@ void ShowRootMenuCmd::execute() { | |||
115 | if (screen == 0) | 115 | if (screen == 0) |
116 | return; | 116 | return; |
117 | 117 | ||
118 | if (screen->getRootmenu()) { | 118 | Window root_ret; |
119 | Window window_ret; | ||
119 | 120 | ||
120 | Window root_ret; | 121 | int rx, ry; |
121 | Window window_ret; | 122 | int wx, wy; |
123 | unsigned int mask; | ||
122 | 124 | ||
123 | int rx, ry; | 125 | if ( XQueryPointer(FbTk::App::instance()->display(), |
124 | int wx, wy; | 126 | screen->rootWindow().window(), &root_ret, &window_ret, |
125 | unsigned int mask; | 127 | &rx, &ry, &wx, &wy, &mask) ) { |
126 | 128 | ||
127 | if ( XQueryPointer(FbTk::App::instance()->display(), | 129 | if ( rx - (screen->getRootmenu().width()/2) > 0 ) |
128 | screen->rootWindow().window(), &root_ret, &window_ret, | 130 | rx-= screen->getRootmenu().width()/2; |
129 | &rx, &ry, &wx, &wy, &mask) ) { | 131 | screen->getRootmenu().move(rx, ry); |
132 | } | ||
130 | 133 | ||
131 | if ( rx - (screen->getRootmenu()->width()/2) > 0 ) | 134 | screen->getRootmenu().show(); |
132 | rx-= screen->getRootmenu()->width()/2; | 135 | screen->getRootmenu().grabInputFocus(); |
133 | screen->getRootmenu()->move(rx, ry); | ||
134 | } | ||
135 | 136 | ||
136 | screen->getRootmenu()->show(); | ||
137 | screen->getRootmenu()->grabInputFocus(); | ||
138 | } | ||
139 | } | 137 | } |
140 | 138 | ||
141 | void ShowWorkspaceMenuCmd::execute() { | 139 | void ShowWorkspaceMenuCmd::execute() { |
@@ -143,26 +141,26 @@ void ShowWorkspaceMenuCmd::execute() { | |||
143 | if (screen == 0) | 141 | if (screen == 0) |
144 | return; | 142 | return; |
145 | 143 | ||
146 | if (screen->getWorkspacemenu()) { | 144 | |
147 | 145 | ||
148 | Window root_ret; | 146 | Window root_ret; |
149 | Window window_ret; | 147 | Window window_ret; |
150 | 148 | ||
151 | int rx, ry; | 149 | int rx, ry; |
152 | int wx, wy; | 150 | int wx, wy; |
153 | unsigned int mask; | 151 | unsigned int mask; |
154 | 152 | ||
155 | if ( XQueryPointer(FbTk::App::instance()->display(), | 153 | if ( XQueryPointer(FbTk::App::instance()->display(), |
156 | screen->rootWindow().window(), &root_ret, &window_ret, | 154 | screen->rootWindow().window(), &root_ret, &window_ret, |
157 | &rx, &ry, &wx, &wy, &mask) ) { | 155 | &rx, &ry, &wx, &wy, &mask) ) { |
158 | 156 | ||
159 | if ( rx - (screen->getWorkspacemenu()->width()/2) > 0 ) | 157 | if ( rx - (screen->getWorkspacemenu().width()/2) > 0 ) |
160 | rx-= screen->getWorkspacemenu()->width()/2; | 158 | rx-= screen->getWorkspacemenu().width()/2; |
161 | screen->getWorkspacemenu()->move(rx, ry); | 159 | screen->getWorkspacemenu().move(rx, ry); |
162 | } | ||
163 | screen->getWorkspacemenu()->show(); | ||
164 | screen->getWorkspacemenu()->grabInputFocus(); | ||
165 | } | 160 | } |
161 | screen->getWorkspacemenu().show(); | ||
162 | screen->getWorkspacemenu().grabInputFocus(); | ||
163 | |||
166 | } | 164 | } |
167 | 165 | ||
168 | void SetWorkspaceNameCmd::execute() { | 166 | void SetWorkspaceNameCmd::execute() { |