aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
authoroga2008-09-22 14:15:03 +0000
committeroga2008-09-22 14:15:03 +0000
commit30fdb32a9e9467d23ad79e6602ac5b30e47e21f1 (patch)
tree8c84be05c3779e1b7d776219dcd1d330f7e5d549 /xevents.c
parent0cac11a31570d71936c55c2244a78de34ea4c5a8 (diff)
downloadcwm-30fdb32a9e9467d23ad79e6602ac5b30e47e21f1.tar.gz
Display the current window title not a previous one in the case of
``show all'' in the window search dialogue. Noticed and diff from Tim van der Molen, thanks!
Diffstat (limited to 'xevents.c')
-rw-r--r--xevents.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/xevents.c b/xevents.c
index c28f550..9c7ba97 100644
--- a/xevents.c
+++ b/xevents.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: xevents.c,v 1.26 2008/07/22 21:01:54 oga Exp $
+ * $Id: xevents.c,v 1.27 2008/09/22 14:15:03 oga Exp $
*/
/*
@@ -375,6 +375,22 @@ xev_handle_shape(struct xevent *xev, XEvent *ee)
client_do_shape(cc);
}
+void
+xev_handle_randr(struct xevent *xev, XEvent *ee)
+{
+ XRRScreenChangeNotifyEvent *rev = (XRRScreenChangeNotifyEvent *)ee;
+ struct client_ctx *cc;
+ struct screen_ctx *sc;
+
+ if ((cc = client_find(rev->window)) != NULL) {
+ XRRUpdateConfiguration(ee);
+ sc = CCTOSC(cc);
+ sc->xmax = rev->width;
+ sc->ymax = rev->height;
+ screen_init_xinerama(sc);
+ }
+}
+
/*
* Called when the keymap has changed.
* Ungrab all keys, reload keymap and then regrab
@@ -525,6 +541,8 @@ xev_loop(void)
default:
if (e.type == Shape_ev)
xev_handle_shape(xev, &e);
+ else if (e.type == Randr_ev)
+ xev_handle_randr(xev, &e);
break;
}