list_back = g_slist_append(0, calloc(1, sizeof(Area)));
panel_config = calloc(1, sizeof(Panel));
+ // window manager's menu default value == true
+ wm_menu = 1;
}
memcpy(&panel_config->area.pix.back, &a->pix.back, sizeof(Color));
memcpy(&panel_config->area.pix.border, &a->pix.border, sizeof(Border));
}
+ else if (strcmp (key, "wm_menu") == 0)
+ wm_menu = atoi (value);
/* Battery */
else if (strcmp (key, "battery") == 0) {
Panel *panel = get_panel(e->xany.window);
if (!panel) return;
- if ((e->xbutton.x < panel->area.paddingxlr) || (e->xbutton.x > panel->area.width-panel->area.paddingxlr) || (e->xbutton.y < panel->area.paddingy) || (e->xbutton.y > panel->area.paddingy+panel->g_taskbar.height)) {
- // forward the click to the desktop window (thanks conky)
- XUngrabPointer(server.dsp, e->xbutton.time);
- e->xbutton.window = server.root_win;
- XSetInputFocus(server.dsp, e->xbutton.window, RevertToParent, e->xbutton.time);
- XSendEvent(server.dsp, e->xbutton.window, False, ButtonPressMask, e);
- return;
+ if (wm_menu) {
+ if ((e->xbutton.x < panel->area.paddingxlr) || (e->xbutton.x > panel->area.width-panel->area.paddingxlr) || (e->xbutton.y < panel->area.paddingy) || (e->xbutton.y > panel->area.paddingy+panel->g_taskbar.height)) {
+ // forward the click to the desktop window (thanks conky)
+ XUngrabPointer(server.dsp, e->xbutton.time);
+ e->xbutton.window = server.root_win;
+ XSetInputFocus(server.dsp, e->xbutton.window, RevertToParent, e->xbutton.time);
+ XSendEvent(server.dsp, e->xbutton.window, False, ButtonPressMask, e);
+ return;
+ }
}
if (e->xbutton.button != 1) return;
Panel *panel = get_panel(e->xany.window);
if (!panel) return;
- if ((e->xbutton.x < panel->area.paddingxlr) || (e->xbutton.x > panel->area.width-panel->area.paddingxlr) || (e->xbutton.y < panel->area.paddingy) || (e->xbutton.y > panel->area.paddingy+panel->g_taskbar.height)) {
- // forward the click to the desktop window (thanks conky)
- e->xbutton.window = server.root_win;
- XSendEvent(server.dsp, e->xbutton.window, False, ButtonReleaseMask, e);
- return;
+ if (wm_menu) {
+ if ((e->xbutton.x < panel->area.paddingxlr) || (e->xbutton.x > panel->area.width-panel->area.paddingxlr) || (e->xbutton.y < panel->area.paddingy) || (e->xbutton.y > panel->area.paddingy+panel->g_taskbar.height)) {
+ // forward the click to the desktop window (thanks conky)
+ e->xbutton.window = server.root_win;
+ XSendEvent(server.dsp, e->xbutton.window, False, ButtonReleaseMask, e);
+ return;
+ }
}
int action = TOGGLE_ICONIFY;
}
// Window list
else if (at == server.atom._NET_CLIENT_LIST) {
+ //printf("Window list\n");
task_refresh_tasklist();
panel_refresh = 1;
}
// Change active
else if (at == server.atom._NET_ACTIVE_WINDOW) {
+ //printf("Change active\n");
GSList *l0;
if (task_active) {
for (i=0 ; i < nb_panel ; i++) {