From ca99e775f48774df9d021ff59acb9312aba7e223 Mon Sep 17 00:00:00 2001 From: akir Date: Mon, 30 Aug 2004 12:21:18 +0000 Subject: closes bug 977054 --- ChangeLog | 4 ++-- src/FbCommands.cc | 17 ++++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index b9cc46c..954dcba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,8 @@ (Format: Year/Month/Day) Changes for 0.9.10: *04/08/30: - * Close bug #1013735, #1012314 (Mathias) - Screen.cc Slit.cc + * Close bug #1013735, #1012314, #977054 (Mathias) + Screen.cc Slit.cc FbCommands.cc * Fix bug in menu-closing with keys (Mathias) FbTk/Menu.cc *04/08/29: diff --git a/src/FbCommands.cc b/src/FbCommands.cc index a2a1aa8..8186e71 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbCommands.cc,v 1.25 2004/07/19 13:52:15 fluxgen Exp $ +// $Id: FbCommands.cc,v 1.26 2004/08/30 12:19:52 akir Exp $ #include "FbCommands.hh" #include "fluxbox.hh" @@ -123,7 +123,8 @@ void SetStyleCmd::execute() { } void ShowRootMenuCmd::execute() { - BScreen *screen = Fluxbox::instance()->mouseScreen(); + Fluxbox *fb = Fluxbox::instance(); + BScreen *screen = fb->mouseScreen(); if (screen == 0) return; @@ -134,7 +135,7 @@ void ShowRootMenuCmd::execute() { int wx, wy; unsigned int mask; - if (XQueryPointer(FbTk::App::instance()->display(), + if (XQueryPointer(fb->display(), screen->rootWindow().window(), &root_ret, &window_ret, &rx, &ry, &wx, &wy, &mask) ) { @@ -142,19 +143,20 @@ void ShowRootMenuCmd::execute() { rx-= screen->getRootmenu().width()/2; screen->getRootmenu().move(rx, ry); } - + fb->checkMenu(); screen->getRootmenu().show(); screen->getRootmenu().grabInputFocus(); } void ShowWorkspaceMenuCmd::execute() { - BScreen *screen = Fluxbox::instance()->mouseScreen(); + + Fluxbox *fb = Fluxbox::instance(); + BScreen *screen = fb->mouseScreen(); if (screen == 0) return; - Window root_ret; Window window_ret; @@ -162,7 +164,7 @@ void ShowWorkspaceMenuCmd::execute() { int wx, wy; unsigned int mask; - if ( XQueryPointer(FbTk::App::instance()->display(), + if ( XQueryPointer(fb->display(), screen->rootWindow().window(), &root_ret, &window_ret, &rx, &ry, &wx, &wy, &mask) ) { @@ -170,6 +172,7 @@ void ShowWorkspaceMenuCmd::execute() { rx-= screen->getWorkspacemenu().width()/2; screen->getWorkspacemenu().move(rx, ry); } + fb->checkMenu(); screen->getWorkspacemenu().show(); screen->getWorkspacemenu().grabInputFocus(); -- cgit v0.11.2