X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fpanel.c;h=2a442b9b877218b5eda9f1afa860769363e19450;hb=HEAD;hp=f9593777d0c6bd1516c7dd1c07c3689991a5f396;hpb=384247b181a3a7332d9e11b906685c4190da5fd1;p=chaz%2Ftint2 diff --git a/src/panel.c b/src/panel.c index f959377..2a442b9 100644 --- a/src/panel.c +++ b/src/panel.c @@ -190,6 +190,9 @@ void init_panel() } if (panel_items_order[k] == 'C') init_clock_panel(p); + + if (panel_items_order[k] == 'F') + init_freespace_panel(p); } set_panel_items_order(p); @@ -199,7 +202,7 @@ void init_panel() p->main_win = XCreateWindow(server.dsp, server.root_win, p->posx, p->posy, p->area.width, p->area.height, 0, server.depth, InputOutput, server.visual, mask, &att); long event_mask = ExposureMask|ButtonPressMask|ButtonReleaseMask|ButtonMotionMask; - if (p->g_task.tooltip_enabled || p->clock.area._get_tooltip_text) + if (p->g_task.tooltip_enabled || p->clock.area._get_tooltip_text || (launcher_enabled && launcher_tooltip_enabled)) event_mask |= PointerMotionMask|LeaveWindowMask; if (panel_autohide) event_mask |= LeaveWindowMask|EnterWindowMask; @@ -409,6 +412,9 @@ void set_panel_items_order(Panel *p) } if (panel_items_order[k] == 'C') p->area.list = g_slist_append(p->area.list, &p->clock); + + if (panel_items_order[k] == 'F') + p->area.list = g_slist_append(p->area.list, &p->freespace); } init_rendering(&p->area, 0); } @@ -699,16 +705,10 @@ Area* click_area(Panel *panel, int x, int y) GSList* it = result->list; while (it) { Area* a = it->data; - if (panel_horizontal) { - if (a->on_screen && x >= a->posx && x <= (a->posx + a->width)) { - new_result = a; - break; - } - } else { - if (a->on_screen && y >= a->posy && y <= (a->posy + a->height)) { - new_result = a; - break; - } + if (a->on_screen && x >= a->posx && x <= (a->posx + a->width) + && y >= a->posy && y <= (a->posy + a->height)) { + new_result = a; + break; } it = it->next; }