X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fpanel.c;h=49ae218e6422ffb02799e0f5a926211a31680c6b;hb=dc4092064f5febcc3bea4e4a19905ac99b6f628e;hp=5c5ab6ad0a2dd749cd15a1c1e2896bec621dbbd8;hpb=4e5af01dacd2a13dcf01b1a3e239591b59241afa;p=chaz%2Ftint2 diff --git a/src/panel.c b/src/panel.c index 5c5ab6a..49ae218 100644 --- a/src/panel.c +++ b/src/panel.c @@ -163,7 +163,7 @@ void init_panel() p->area.panel = p; p->area.on_screen = 1; p->area.resize = 1; - p->area.size_mode = SIZE_BY_CONTENT; + p->area.size_mode = SIZE_BY_LAYOUT; p->area._resize = resize_panel; p->g_taskbar.area.parent = p; p->g_taskbar.area.panel = p; @@ -688,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; }