Index: panel-plugin/mailwatch-plugin.c =================================================================== --- panel-plugin/mailwatch-plugin.c (revision 19528) +++ panel-plugin/mailwatch-plugin.c (working copy) @@ -168,16 +168,20 @@ gpointer user_data) { XfceMailwatchPlugin *mwp = user_data; - - switch(evt->button) { - case 1: /* left */ - if(mwp->click_command && *mwp->click_command) - xfce_exec(mwp->click_command, FALSE, FALSE, NULL); - break; - - case 2: /* middle */ - xfce_mailwatch_force_update(mwp->mailwatch); - break; + gint x = (gint) evt->x, y = (gint) evt->y; + + if ( x >= w->allocation.x && x < w->allocation.x + w->allocation.width && + y >= w->allocation.y && y < w->allocation.y + w->allocation.height ) { + switch(evt->button) { + case 1: /* left */ + if(mwp->click_command && *mwp->click_command) + xfce_exec(mwp->click_command, FALSE, FALSE, NULL); + break; + + case 2: /* middle */ + xfce_mailwatch_force_update(mwp->mailwatch); + break; + } } return FALSE;