aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index 97014cc..fbbfac0 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -658,6 +658,10 @@ run(void) {
658 if(ev.xexpose.count == 0) 658 if(ev.xexpose.count == 0)
659 drawmenu(); 659 drawmenu();
660 break; 660 break;
661 case VisibilityNotify:
662 if (ev.xvisibility.state != VisibilityUnobscured)
663 XRaiseWindow(dpy, win);
664 break;
661 } 665 }
662} 666}
663 667
@@ -691,7 +695,7 @@ setup(Bool topbar) {
691 /* menu window */ 695 /* menu window */
692 wa.override_redirect = True; 696 wa.override_redirect = True;
693 wa.background_pixmap = ParentRelative; 697 wa.background_pixmap = ParentRelative;
694 wa.event_mask = ExposureMask | ButtonPressMask | KeyPressMask; 698 wa.event_mask = ExposureMask | ButtonPressMask | KeyPressMask | VisibilityChangeMask;
695 699
696 /* menu window geometry */ 700 /* menu window geometry */
697 mh = dc.font.height + 2; 701 mh = dc.font.height + 2;