summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsabetts <sabetts>2006-12-14 12:06:04 +0000
committersabetts <sabetts>2006-12-14 12:06:04 +0000
commit1ca0ac6946589f8450cd166ae5bff31689abe1b8 (patch)
treee19692556cd44d19a8229396c588bc5298e8f3d2 /src
parent382f48f4cd9861e8c08d8d9c7ea7f67e87bd4e00 (diff)
downloadratpoison-1ca0ac6946589f8450cd166ae5bff31689abe1b8.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/actions.c24
-rw-r--r--src/bar.c18
-rw-r--r--src/events.c3
-rw-r--r--src/input.c12
-rw-r--r--src/manage.c3
5 files changed, 58 insertions, 2 deletions
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();
diff --git a/src/bar.c b/src/bar.c
index 01ecfcd..08c8d23 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -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);