diff options
author | sabetts <sabetts> | 2006-12-14 12:06:04 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2006-12-14 12:06:04 +0000 |
commit | 1ca0ac6946589f8450cd166ae5bff31689abe1b8 (patch) | |
tree | e19692556cd44d19a8229396c588bc5298e8f3d2 | |
parent | 382f48f4cd9861e8c08d8d9c7ea7f67e87bd4e00 (diff) | |
download | ratpoison-1ca0ac6946589f8450cd166ae5bff31689abe1b8.zip |
*** empty log message ***
-rw-r--r-- | AUTHORS | 5 | ||||
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | src/actions.c | 24 | ||||
-rw-r--r-- | src/bar.c | 18 | ||||
-rw-r--r-- | src/events.c | 3 | ||||
-rw-r--r-- | src/input.c | 12 | ||||
-rw-r--r-- | src/manage.c | 3 |
7 files changed, 74 insertions, 4 deletions
@@ -1,11 +1,11 @@ -Shawn Betts (sabetts@users.sourceforge.net) +Shawn Betts (sabetts at vcn bc ca) Shawn is the original author and current maintainer for ratpoison. Sickened by the rat and the trend in window managers, he sat down one evening and pulled an all-nighter writing the first version of ratpoison. -Ryan Yeske (rcyeske@vcn.bc.ca) +Ryan Yeske (rcyeske at vcn bc ca) Ryan doesn't commit much code these days, but that's not because he doesn't want to, its just that he forgot his cvs ssh password. @@ -39,3 +39,4 @@ Antti Nykänen <aon at iki dot fi> rubikitch <rubikitch at ruby-lang org> Florian E.J. Fruth <fejf at rommel stw uni-erlangen de> Tim Cooijmans <tim at aapopfiets nl> +Andreas Seltenreich <uwi7 at rz uni-karlsruhe de> @@ -1,3 +1,16 @@ +2006-12-13 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> + + * src/bar.c (show_bar, prepare_bar): Switch to default colormap. + (hide_bar): Possibly restore colormap. + + * src/input.c (get_more_input): Temporarily install default + colormap. + + * src/actions.c (cmd_help, cmd_license): Likewise. + + * src/events.c (colormap_notify): Postpone installing colormap + when bar is raised. + 2006-11-23 Shawn Betts <sabetts@vcn.bc.ca> * src/events.c (execute_remote_command): return a cmdred instead diff --git a/src/actions.c b/src/actions.c index 969fa95..70136d8 100644 --- a/src/actions.c +++ b/src/actions.c @@ -3135,6 +3135,11 @@ cmd_license (int interactive, struct cmdarg **args) "[Press any key to end.] ", NULL}; + /* Switch to the default colormap. */ + if (current_window()) + XUninstallColormap (dpy, current_window()->colormap); + XInstallColormap (dpy, s->def_cmap); + XMapRaised (dpy, s->help_window); XGrabKeyboard (dpy, s->help_window, False, GrabModeSync, GrabModeAsync, CurrentTime); @@ -3171,6 +3176,13 @@ cmd_license (int interactive, struct cmdarg **args) XUngrabKeyboard (dpy, CurrentTime); XUnmapWindow (dpy, s->help_window); + /* Possibly restore colormap. */ + if (current_window()) + { + XUninstallColormap (dpy, s->def_cmap); + XInstallColormap (dpy, current_window()->colormap); + } + /* The help window overlaps the bar, so redraw it. */ if (current_screen()->bar_is_raised) redraw_last_message(); @@ -3199,6 +3211,11 @@ cmd_help (int interactive, struct cmdarg **args) int drawing_keys = 1; /* 1 if we are drawing keys 0 if we are drawing commands */ char *keysym_name; + /* Switch to the default colormap. */ + if (current_window()) + XUninstallColormap (dpy, current_window()->colormap); + XInstallColormap (dpy, s->def_cmap); + XMapRaised (dpy, s->help_window); XGrabKeyboard (dpy, s->help_window, False, GrabModeSync, GrabModeAsync, CurrentTime); @@ -3289,6 +3306,13 @@ cmd_help (int interactive, struct cmdarg **args) XUngrabKeyboard (dpy, CurrentTime); XUnmapWindow (dpy, s->help_window); + /* Possibly restore colormap. */ + if (current_window()) + { + XUninstallColormap (dpy, s->def_cmap); + XInstallColormap (dpy, current_window()->colormap); + } + /* The help window overlaps the bar, so redraw it. */ if (current_screen()->bar_is_raised) redraw_last_message(); @@ -62,6 +62,14 @@ hide_bar (rp_screen *s) { s->bar_is_raised = 0; XUnmapWindow (dpy, s->bar_window); + + /* Possibly restore colormap. */ + if (current_window()) + { + XUninstallColormap (dpy, s->def_cmap); + XInstallColormap (dpy, current_window()->colormap); + } + return 1; } @@ -78,6 +86,11 @@ show_bar (rp_screen *s, char *fmt) XMapRaised (dpy, s->bar_window); update_window_names (s, fmt); + /* Switch to the default colormap */ + if (current_window()) + XUninstallColormap (dpy, current_window()->colormap); + XInstallColormap (dpy, s->def_cmap); + reset_alarm(); return 1; } @@ -381,6 +394,11 @@ prepare_bar (rp_screen *s, int width, int height) { s->bar_is_raised = BAR_IS_MESSAGE; XMapRaised (dpy, s->bar_window); + + /* Switch to the default colormap */ + if (current_window()) + XUninstallColormap (dpy, current_window()->colormap); + XInstallColormap (dpy, s->def_cmap); } XRaiseWindow (dpy, s->bar_window); diff --git a/src/events.c b/src/events.c index f09f9d1..f42d7db 100644 --- a/src/events.c +++ b/src/events.c @@ -660,7 +660,8 @@ colormap_notify (XEvent *ev) XGetWindowAttributes (dpy, win->w, &attr); win->colormap = attr.colormap; - if (win == current_window()) + if (win == current_window() + && !current_screen()->bar_is_raised) { XInstallColormap (dpy, win->colormap); } diff --git a/src/input.c b/src/input.c index cadd5cb..afef806 100644 --- a/src/input.c +++ b/src/input.c @@ -497,6 +497,11 @@ get_more_input (char *prompt, char *preinput, /* We don't want to draw overtop of the program bar. */ hide_bar (s); + /* Switch to the default colormap. */ + if (current_window()) + XUninstallColormap (dpy, current_window()->colormap); + XInstallColormap (dpy, s->def_cmap); + XMapWindow (dpy, s->input_window); XRaiseWindow (dpy, s->input_window); XClearWindow (dpy, s->input_window); @@ -547,5 +552,12 @@ get_more_input (char *prompt, char *preinput, XUngrabKeyboard (dpy, CurrentTime); XUnmapWindow (dpy, s->input_window); + /* Possibly restore colormap. */ + if (current_window()) + { + XUninstallColormap (dpy, s->def_cmap); + XInstallColormap (dpy, current_window()->colormap); + } + return final_input; } diff --git a/src/manage.c b/src/manage.c index 50743b4..c1cf8a1 100644 --- a/src/manage.c +++ b/src/manage.c @@ -798,10 +798,11 @@ force_maximize (rp_window *win) } else { - XResizeWindow (dpy, win->w, win->width + 1, win->height + 1); + XResizeWindow (dpy, win->w, win->width + 10, win->height + 10); } XSync (dpy, False); + usleep (100); /* Resize the window to its proper maximum size. */ XMoveResizeWindow (dpy, win->w, win->scr->left + win->x, win->scr->top + win->y, win->width, win->height); |