diff options
author | sabetts <sabetts> | 2001-09-17 01:03:49 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-09-17 01:03:49 +0000 |
commit | 30059e1fb5dc3373c0bef39080a69d614a20ba82 (patch) | |
tree | 2f70ab9c9d41df4958fa9c83fe1897606380f8e2 /src/actions.c | |
parent | cd269f1a481cf2ad46a9c170e6021d5b24755eb4 (diff) | |
download | ratpoison-30059e1fb5dc3373c0bef39080a69d614a20ba82.zip |
* src/actions.c (update_all_gcs): new function
(cmd_deffont): update the graphics contexts.
* src/actions.c (spawn): Only call setsid if it exists.
(spawn): Only call setpgid if it exists.
(spawn): if setpgid doesn't exist, try setpgrp.
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 49 |
1 files changed, 31 insertions, 18 deletions
diff --git a/src/actions.c b/src/actions.c index 8468f16..9b02e84 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1506,6 +1506,36 @@ cmd_defbarloc (int interactive, void *data) return NULL; } +static void +update_gc (screen_info *s) +{ + XGCValues gv; + + gv.foreground = s->fg_color; + gv.background = s->bg_color; + gv.function = GXcopy; + gv.line_width = 1; + gv.subwindow_mode = IncludeInferiors; + gv.font = defaults.font->fid; + XFreeGC (dpy, s->normal_gc); + s->normal_gc = XCreateGC(dpy, s->root, + GCForeground | GCBackground + | GCFunction | GCLineWidth + | GCSubwindowMode | GCFont, &gv); +} + +static void +update_all_gcs () +{ + int i; + + for (i=0; i<num_screens; i++) + { + update_gc (&screens[i]); + } +} + + char * cmd_deffont (int interactive, void *data) { @@ -1523,6 +1553,7 @@ cmd_deffont (int interactive, void *data) /* Save the font as the default. */ XFreeFont (dpy, defaults.font); defaults.font = font; + update_all_gcs(); return NULL; } @@ -1692,24 +1723,6 @@ cmd_defwinname (int interactive, void *data) return NULL; } -static void -update_gc (screen_info *s) -{ - XGCValues gv; - - gv.foreground = s->fg_color; - gv.background = s->bg_color; - gv.function = GXcopy; - gv.line_width = 1; - gv.subwindow_mode = IncludeInferiors; - gv.font = defaults.font->fid; - XFreeGC (dpy, s->normal_gc); - s->normal_gc = XCreateGC(dpy, s->root, - GCForeground | GCBackground - | GCFunction | GCLineWidth - | GCSubwindowMode | GCFont, &gv); -} - char * cmd_deffgcolor (int interactive, void *data) { |