aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/taskbar.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/taskbar.c b/src/taskbar.c
index 1e2cb1b..f0a72fe 100644
--- a/src/taskbar.c
+++ b/src/taskbar.c
@@ -446,15 +446,17 @@ void SignalTaskbar(const TimeType *now, int x, int y) {
for(bp = bars; bp; bp = bp->next) {
if(abs(bp->mousex - x) < POPUP_DELTA
&& abs(bp->mousey - y) < POPUP_DELTA) {
- if(GetTimeDifference(now, &bp->mouseTime) >= popupDelay) {
- if(bp->layout == LAYOUT_HORIZONTAL) {
- np = GetNode(bp, x - bp->cp->screenx);
- } else {
- np = GetNode(bp, y - bp->cp->screeny);
- }
+ if(bp->layout == LAYOUT_HORIZONTAL) {
+ np = GetNode(bp, x - bp->cp->screenx);
+ } else {
+ np = GetNode(bp, y - bp->cp->screeny);
+ }
+ if(GetTimeDifference(now, &bp->mouseTime)>=popupDelay) {
if(np) {
ShowPopup(x, y, np->client->name);
}
+ } else {
+ FocusClient(np->client);
}
}
}