diff options
author | sabetts <sabetts> | 2005-10-20 06:21:44 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2005-10-20 06:21:44 +0000 |
commit | c7b7f18ea8e839f142688ad2f2fa3e3b128abfad (patch) | |
tree | fbd16bfc8527e9842f57f798589eddd66e320238 /src/screen.c | |
parent | 0f52e43fa926565b8ab1b0f95fc401e15a4bd8c7 (diff) | |
download | ratpoison-c7b7f18ea8e839f142688ad2f2fa3e3b128abfad.zip |
* src/window.c: include unistd.h
(get_child_info): new function
(add_to_window_list): get the window's client's pid if possible
and assign the window the appropriate group and frame.
(add_to_window_list): init intended_frame_number
(save_mouse_position): save the position relative to the window
(give_window_focus): restore the position relative to the window
(set_active_window_body): put the window in the frame contained in
intended_frame_number when appropriate.
* src/screen.c (screen_find_frame_by_frame): new function
(init_screen): add the net_supported atom to the root window.
* src/main.c (main): init netwm atoms
* src/group.c (groups_find_group_by_group): new function
* src/globals.c (_net_wm_pid, _net_supported): new globals
* src/data.h (struct rp_window): new field intended_frame_number.
(struct rp_child_info): new fields group, frame, screen.
* src/actions.c (spawn): call the command directly when new
argument, raw, is non zero. all callers updated.
(spawn): fill in the frame, group and screen for the child.
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 19 |
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; |