aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-12-19 00:48:41 (GMT)
committerfluxgen <fluxgen>2003-12-19 00:48:41 (GMT)
commit3999aded8c6b7f4efa758750d031cf5ef283ce7d (patch)
tree48c1790b68ca909670fd48cfff67c6c0100283aa
parent0c8e6164920107bc612015269a50aed17f0feeae (diff)
downloadfluxbox-3999aded8c6b7f4efa758750d031cf5ef283ce7d.zip
fluxbox-3999aded8c6b7f4efa758750d031cf5ef283ce7d.tar.bz2
cleaning
-rw-r--r--src/FbCommands.cc62
-rw-r--r--src/Remember.cc11
2 files changed, 37 insertions, 36 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
141void ShowWorkspaceMenuCmd::execute() { 139void 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
168void SetWorkspaceNameCmd::execute() { 166void SetWorkspaceNameCmd::execute() {
diff --git a/src/Remember.cc b/src/Remember.cc
index 43647a0..fef995b 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -21,18 +21,21 @@
21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22// DEALINGS IN THE SOFTWARE. 22// DEALINGS IN THE SOFTWARE.
23 23
24// $Id: Remember.cc,v 1.32 2003/12/11 15:23:14 fluxgen Exp $ 24// $Id: Remember.cc,v 1.33 2003/12/19 00:48:41 fluxgen Exp $
25 25
26#include "Remember.hh" 26#include "Remember.hh"
27#include "ClientPattern.hh" 27#include "ClientPattern.hh"
28#include "StringUtil.hh"
29#include "Screen.hh" 28#include "Screen.hh"
30#include "Window.hh" 29#include "Window.hh"
31#include "WinClient.hh" 30#include "WinClient.hh"
32#include "FbMenu.hh" 31#include "FbMenu.hh"
33#include "MenuItem.hh"
34#include "App.hh"
35#include "FbCommands.hh" 32#include "FbCommands.hh"
33#include "fluxbox.hh"
34
35#include "FbTk/StringUtil.hh"
36#include "FbTk/MenuItem.hh"
37#include "FbTk/App.hh"
38
36 39
37#include <X11/Xlib.h> 40#include <X11/Xlib.h>
38 41