summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2006-03-16 01:41:13 +0000
committersabetts <sabetts>2006-03-16 01:41:13 +0000
commit4e1d3ffcec845b5618f6ac8a2b2c8ad40dadbceb (patch)
tree3bfca1227c7e1017504c1b4ac6f13832c1600764 /src/events.c
parent2af887d39f6cba4cbbcaac8b51ffa773be809f23 (diff)
downloadratpoison-4e1d3ffcec845b5618f6ac8a2b2c8ad40dadbceb.zip
2006-03-15 Bernhard R. Link <brlink@debian.org>
* src/screen.c (screen_update): new function (init_screen): listen for screen resizes * src/screen.h: new prototype * src/events.c (configure_notify): new function (delegate_event): call configure_notify for ConfigureNotify events * src/frame.c (frame_dump): remember the size of the screen the frame coordinates are relative to. (frame_restore): adopt coordinates to possible screen resizes. * src/frame.h (frame_fump): take a screen argument (frame_read): likewise * src/actions.c (cmd_tmpwm): listen for screen resizes again (fdump, frestore, cmd_fdump): supply screen to frame_dump, frameread
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/events.c b/src/events.c
index 7e6e9ca..ad43cfe 100644
--- a/src/events.c
+++ b/src/events.c
@@ -702,6 +702,18 @@ mapping_notify (XMappingEvent *ev)
grab_keys_all_wins();
}
+static void
+configure_notify (XConfigureEvent *ev)
+{
+ rp_screen *s;
+
+ s = find_screen(ev->window);
+ if (s != NULL)
+ /* This is a root window of a screen,
+ * look if its width or height changed: */
+ screen_update(s,ev->width,ev->height);
+}
+
/* This is called whan an application has requested the
selection. Copied from rxvt. */
static void
@@ -847,6 +859,10 @@ delegate_event (XEvent *ev)
break;
case ConfigureNotify:
+ PRINT_DEBUG (("--- Handling ConfigureNotify ---\n"));
+ configure_notify( &ev->xconfigure );
+ break;
+
case MapNotify:
case Expose:
case MotionNotify: