From: Thierry Lorthiois Date: Fri, 16 Oct 2009 18:46:09 +0000 (+0000) Subject: fixed WM menu management X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Ftint2;a=commitdiff_plain;h=b0ff4722b169b9bc26240a0fdecbc2d911f7afb8 fixed WM menu management --- diff --git a/src/config.c b/src/config.c index bb50b87..8de01cd 100644 --- a/src/config.c +++ b/src/config.c @@ -91,7 +91,7 @@ void init_config() systray.sort = 3; // window manager's menu default value == false - wm_menu = wm_menu_open = 0; + wm_menu = 0; max_tick_urgent = 7; } diff --git a/src/panel.c b/src/panel.c index 2e47085..2341237 100644 --- a/src/panel.c +++ b/src/panel.c @@ -43,7 +43,7 @@ int mouse_tilt_left; int mouse_tilt_right; int panel_mode; -int wm_menu, wm_menu_open; +int wm_menu; int panel_dock=0; // default not in the dock int panel_position; int panel_horizontal; diff --git a/src/panel.h b/src/panel.h index b3c8fde..962c61f 100644 --- a/src/panel.h +++ b/src/panel.h @@ -38,7 +38,7 @@ extern int mouse_tilt_right; //panel mode enum { SINGLE_DESKTOP=0, MULTI_DESKTOP }; extern int panel_mode; -extern int wm_menu, wm_menu_open; +extern int wm_menu; extern int panel_dock; //panel position diff --git a/src/tint.c b/src/tint.c index f1de477..d098562 100644 --- a/src/tint.c +++ b/src/tint.c @@ -270,7 +270,6 @@ void event_button_press (XEvent *e) if (wm_menu && !task_drag && !click_clock(panel, e->xbutton.x, e->xbutton.y) && (e->xbutton.button != 1) ) { // forward the click to the desktop window (thanks conky) - wm_menu_open = 1; XUngrabPointer(server.dsp, e->xbutton.time); e->xbutton.window = server.root_win; // icewm doesn't open under the mouse. @@ -292,14 +291,6 @@ void event_button_release (XEvent *e) Panel *panel = get_panel(e->xany.window); if (!panel) return; - if (wm_menu && wm_menu_open) { - // forward the click to the desktop window (thanks conky) - wm_menu_open = 0; - e->xbutton.window = server.root_win; - XSendEvent(server.dsp, e->xbutton.window, False, ButtonReleaseMask, e); - return; - } - int action = TOGGLE_ICONIFY; switch (e->xbutton.button) { case 2: