From: Anselm R Garbe Date: Thu, 1 Apr 2010 20:40:11 +0000 (+0100) Subject: applied Troels' patch, thanks Troels! X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=0ba3bae98196ec8a0887f494cb8a2dd5b645f763;p=dmenu.git applied Troels' patch, thanks Troels! --- diff --git a/dmenu.c b/dmenu.c index 97014cc..fbbfac0 100644 --- a/dmenu.c +++ b/dmenu.c @@ -658,6 +658,10 @@ run(void) { if(ev.xexpose.count == 0) drawmenu(); break; + case VisibilityNotify: + if (ev.xvisibility.state != VisibilityUnobscured) + XRaiseWindow(dpy, win); + break; } } @@ -691,7 +695,7 @@ setup(Bool topbar) { /* menu window */ wa.override_redirect = True; wa.background_pixmap = ParentRelative; - wa.event_mask = ExposureMask | ButtonPressMask | KeyPressMask; + wa.event_mask = ExposureMask | ButtonPressMask | KeyPressMask | VisibilityChangeMask; /* menu window geometry */ mh = dc.font.height + 2;