From 88bb66a1eebba460aedbc6dcd486f725fd3ca9a0 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 12 Aug 2002 03:28:17 +0000 Subject: added showMenu function --- src/Window.cc | 35 +++++++++++++++++++++-------------- src/Window.hh | 4 ++-- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index 3c229a9..9ec789b 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.66 2002/08/11 22:44:29 fluxgen Exp $ +// $Id: Window.cc,v 1.67 2002/08/12 03:28:17 fluxgen Exp $ #include "Window.hh" @@ -321,9 +321,9 @@ tab(0) setFocusFlag(false); - #ifdef GNOME +#ifdef GNOME updateGnomeAtoms(); - #endif +#endif // GNOME #ifdef DEBUG fprintf(stderr, "%s(%d): FluxboxWindow(this=%p)\n", __FILE__, __LINE__, this); @@ -333,7 +333,7 @@ tab(0) FluxboxWindow::~FluxboxWindow() { - if (screen==0) //the window wasn't created + if (screen == 0) //the window wasn't created return; Fluxbox *fluxbox = Fluxbox::instance(); @@ -360,12 +360,12 @@ FluxboxWindow::~FluxboxWindow() { tab = 0; } - if (client.mwm_hint!=0) { + if (client.mwm_hint != 0) { XFree(client.mwm_hint); client.mwm_hint = 0; } - if (client.blackbox_hint!=0) { + if (client.blackbox_hint != 0) { XFree(client.blackbox_hint); client.blackbox_hint = 0; } @@ -374,9 +374,9 @@ FluxboxWindow::~FluxboxWindow() { if (isTransient()) { //guard from having transient_for = this if (client.transient_for == this) { - #ifdef DEBUG +#ifdef DEBUG cerr<<__FILE__<<"("<<__LINE__<<"): WARNING! client.transient_for == this WARNING!"<move(mx, my); + windowmenu->show(); + XRaiseWindow(display, windowmenu->windowID()); + XRaiseWindow(display, windowmenu->getSendToMenu()->windowID()); + XRaiseWindow(display, windowmenu->getSendGroupToMenu()->windowID()); +} + void FluxboxWindow::restoreGravity() { // restore x coordinate switch (client.win_gravity) { @@ -3173,11 +3184,7 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent *be) { if (windowmenu) { if (! windowmenu->isVisible()) { // if not window menu is visible then show it - windowmenu->move(mx, my); - windowmenu->show(); - XRaiseWindow(display, windowmenu->windowID()); - XRaiseWindow(display, windowmenu->getSendToMenu()->windowID()); - XRaiseWindow(display, windowmenu->getSendGroupToMenu()->windowID()); + showMenu(mx, my); } else //else hide menu windowmenu->hide(); } diff --git a/src/Window.hh b/src/Window.hh index 549971e..33a348f 100644 --- a/src/Window.hh +++ b/src/Window.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.hh,v 1.26 2002/08/11 22:33:41 fluxgen Exp $ +// $Id: Window.hh,v 1.27 2002/08/12 03:28:17 fluxgen Exp $ #ifndef WINDOW_HH #define WINDOW_HH @@ -201,7 +201,7 @@ public: void setWorkspace(int n); void changeBlackboxHints(BaseDisplay::BlackboxHints *bh); void restoreAttributes(); - + void showMenu(int mx, int my); void buttonPressEvent(XButtonEvent *be); void buttonReleaseEvent(XButtonEvent *be); -- cgit v0.11.2