X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fpanel.c;h=61b4b2025a01a36be364a4abf90b257d79653b7c;hb=a72ae04bf96477f11d8bf24baea54596f6d3356b;hp=662c6c5d1f5406e85ce4fafaf5d1efe7e9dc263a;hpb=f3e92f7e3626e3992efff2b55a08a938af38efff;p=chaz%2Ftint2 diff --git a/src/panel.c b/src/panel.c index 662c6c5..61b4b20 100644 --- a/src/panel.c +++ b/src/panel.c @@ -163,6 +163,7 @@ void init_panel() p->area.panel = p; p->area.on_screen = 1; p->area.resize = 1; + p->area.size_mode = SIZE_BY_LAYOUT; p->area._resize = resize_panel; p->g_taskbar.area.parent = p; p->g_taskbar.area.panel = p; @@ -303,6 +304,7 @@ void init_panel_size_and_position(Panel *panel) void resize_panel(void *obj) { Panel *panel = (Panel*)obj; +//printf("resize_panel : taskbar\n"); if (panel_horizontal) { int taskbar_width, modulo_width = 0; @@ -508,7 +510,7 @@ void set_panel_properties(Panel *p) XChangeProperty(server.dsp, p->main_win, server.atom._MOTIF_WM_HINTS, server.atom._MOTIF_WM_HINTS, 32, PropModeReplace, (unsigned char *) prop, 5); // XdndAware - Register for Xdnd events - long version=5; + Atom version=4; XChangeProperty(server.dsp, p->main_win, server.atom.XdndAware, XA_ATOM, 32, PropModeReplace, (unsigned char*)&version, 1); update_strut(p); @@ -686,8 +688,8 @@ LauncherIcon *click_launcher_icon (Panel *panel, int x, int y) LauncherIcon *icon; for (l0 = launcher->list_icons; l0 ; l0 = l0->next) { icon = l0->data; - if (x >= (launcher->area.posx + icon->x) && x <= (launcher->area.posx + icon->x + icon->width) && - y >= (launcher->area.posy + icon->y) && y <= (launcher->area.posy + icon->y + icon->height)) { + if (x >= (launcher->area.posx + icon->x) && x <= (launcher->area.posx + icon->x + icon->icon_size) && + y >= (launcher->area.posy + icon->y) && y <= (launcher->area.posy + icon->y + icon->icon_size)) { //printf("Hit rect x=%d y=%d xmax=%d ymax=%d\n", launcher->area.posx + icon->x, launcher->area.posy + icon->y, launcher->area.posx + icon->x + icon->width, launcher->area.posy + icon->y + icon->height); return icon; }