summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c
index 0cf47a2..07446d7 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -134,6 +134,21 @@ screen_get_frame (rp_screen *s, int frame_num)
return NULL;
}
+rp_frame *
+screen_find_frame_by_frame (rp_screen *s, rp_frame *f)
+{
+ rp_frame *cur;
+
+ list_for_each_entry (cur, &s->frames, node)
+ {
+ PRINT_DEBUG (("cur=%p f=%p\n", cur, f));
+ if (cur == f)
+ return cur;
+ }
+
+ return NULL;
+}
+
/* Given a root window, return the rp_screen struct */
rp_screen *
find_screen (Window w)
@@ -254,6 +269,10 @@ init_screen (rp_screen *s, int screen_num)
| SubstructureRedirectMask | SubstructureNotifyMask );
XSync (dpy, False);
+ /* Add netwm support. FIXME: I think this is busted. */
+ XChangeProperty (dpy, RootWindow (dpy, screen_num),
+ _net_supported, XA_ATOM, 32, PropModeReplace, &_net_wm_pid, 1);
+
/* Set the numset for the frames to our global numset. */
s->frames_numset = rp_frame_numset;