all repos — fluxbox @ 88bb66a1eebba460aedbc6dcd486f725fd3ca9a0

custom fork of the fluxbox windowmanager

added showMenu function
fluxgen fluxgen
commit

88bb66a1eebba460aedbc6dcd486f725fd3ca9a0

parent

a691d915f85a7010ad9d6c4be3ac6ab34cc202d6

2 files changed, 23 insertions(+), 16 deletions(-)

jump to
M src/Window.ccsrc/Window.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ }

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 @@ }

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 @@ delete tab;

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 @@

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!"<<endl; - #endif //DEBUG +#endif //DEBUG client.transient_for = 0; }

@@ -1954,6 +1954,10 @@ }

void FluxboxWindow::maximize(unsigned int button) { + // deiconify if we're iconic + if (isIconic()) + deiconify(); + if (! maximized) { int dx, dy; unsigned int dw, dh, slitModL = 0, slitModR = 0, slitModT = 0, slitModB = 0;

@@ -2619,7 +2623,14 @@

setState(current_state); } - +void FluxboxWindow::showMenu(int mx, int my) { + windowmenu->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 @@ ((decorations.titlebar) ? frame.title_h : frame.y_border);

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(); }
M src/Window.hhsrc/Window.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ void configure(int dx, int dy, unsigned int dw, unsigned int dh);

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);