summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-02-28 05:15:04 +0000
committersabetts <sabetts>2001-02-28 05:15:04 +0000
commit0d8bccdf85cf8e55f8cc1246908a2df79abccec0 (patch)
tree329d6005c4604e47241b7b3d3baa1dcc413e0fa5 /src
parent754b72f96a7931913a1e281da3d92843843c7fb6 (diff)
downloadratpoison-0d8bccdf85cf8e55f8cc1246908a2df79abccec0.zip
* main.c (handler): Prepends error message with "ERROR: ".
Displays error in message bar. Returns 0. * events.c (destroy_window): sets rp_current_window to NULL when there are no more mapped windows. (destroy_window): calls set_current_window and find_window_other directly instead of cmd_other.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/events.c22
-rw-r--r--src/main.c9
3 files changed, 32 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 30ef558..d51b88b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
+2001-02-27 shawn <sabetts@diggin.lamenet.tmp>
+
+ * main.c (handler): Prepends error message with "ERROR: ".
+ Displays error in message bar. Returns 0.
+
+ * events.c (destroy_window): sets rp_current_window to NULL when
+ there are no more mapped windows.
+ (destroy_window): calls set_current_window and find_window_other
+ directly instead of cmd_other.
+
2001-02-26 shawn <sabetts@diggin.lamenet.tmp>
* list.c (save_mouse_position): stores the mouse position relative
diff --git a/src/events.c b/src/events.c
index 2c56253..13cab22 100644
--- a/src/events.c
+++ b/src/events.c
@@ -171,10 +171,16 @@ destroy_window (XDestroyWindowEvent *ev)
unmanage (win);
- /* Switch to last viewed window */
- ignore_badwindow = 1;
- cmd_other (NULL);
- ignore_badwindow = 0;
+ if (rp_mapped_window_sentinel->next == rp_mapped_window_sentinel
+ && rp_mapped_window_sentinel->prev == rp_mapped_window_sentinel)
+ {
+ rp_current_window = NULL;
+ }
+ else
+ {
+ /* Switch to last viewed window */
+ set_current_window( find_window_other() );
+ }
}
else
{
@@ -252,10 +258,10 @@ configure_request (XConfigureRequestEvent *e)
need_resize = 1;
}
- if (need_move && !need_resize)
- {
+/* if (need_move && !need_resize) */
+/* { */
send_configure (win);
- }
+/* } */
maximize (win);
@@ -360,9 +366,11 @@ key_press (XEvent *ev)
{
if (rp_current_window)
{
+ ignore_badwindow = 1;
ev->xkey.window = rp_current_window->w;
XSendEvent (dpy, rp_current_window->w, False, KeyPressMask, ev);
XSync (dpy, False);
+ ignore_badwindow = 0;
}
}
}
diff --git a/src/main.c b/src/main.c
index 4034404..97a61f8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -118,10 +118,15 @@ handler (Display *d, XErrorEvent *e)
if (ignore_badwindow && e->error_code == BadWindow) return 0;
- XGetErrorText (d, e->error_code, error_msg, sizeof (error_msg));
+ strcpy (error_msg, "ERROR: ");
+
+ XGetErrorText (d, e->error_code, error_msg + 7, sizeof (error_msg) - 7);
fprintf (stderr, "ratpoison: %s!\n", error_msg);
- exit (EXIT_FAILURE);
+ marked_message (error_msg, 0, strlen (error_msg));
+
+/* exit (EXIT_FAILURE); */
+ return 0;
}
void