summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--src/events.c15
-rw-r--r--src/events.h2
-rw-r--r--src/manage.c9
-rw-r--r--src/messages.h2
5 files changed, 26 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 8006ae5..c2e9c65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-04-03 Shawn Betts <sabetts@vcn.bc.ca>
+
+ * src/messages.h (MESSAGE_MAP_TRANSIENT_GROUP): new define
+ (MESSAGE_MAP_WINDOW_GROUP): likewise
+
+ * src/manage.c (map_window): call show_rudeness_msg
+
+ * src/events.h (show_rudeness_msg): new prototype
+
+ * src/events.c (show_rudeness_msg): renamed from
+ show_rudeness_raise_msg. handle the MAP messages as well. all
+ callers updated.
+
2006-04-02 Shawn Betts <sabetts@vcn.bc.ca>
* 1.4.0 release
diff --git a/src/events.c b/src/events.c
index 084cf9c..9ea61a0 100644
--- a/src/events.c
+++ b/src/events.c
@@ -42,27 +42,28 @@
action.c which need to forward events to other windows. */
XEvent rp_current_event;
+/* RAISED is non zero if a raised message should be used 0 for a map message. */
void
-show_rudeness_raise_msg (rp_window *win)
+show_rudeness_msg (rp_window *win, int raised)
{
rp_group *g = groups_find_group_by_window (win);
rp_window_elem *elem = group_find_window (&g->mapped_windows, win);
if (g == rp_current_group)
{
if (win->transient)
- marked_message_printf (0, 0, MESSAGE_RAISE_TRANSIENT,
+ marked_message_printf (0, 0, raised ? MESSAGE_RAISE_TRANSIENT:MESSAGE_MAP_TRANSIENT,
elem->number, window_name (win));
else
- marked_message_printf (0, 0, MESSAGE_RAISE_WINDOW,
+ marked_message_printf (0, 0, raised ? MESSAGE_RAISE_WINDOW:MESSAGE_MAP_WINDOW,
elem->number, window_name (win));
}
else
{
if (win->transient)
- marked_message_printf (0, 0, MESSAGE_RAISE_TRANSIENT_GROUP,
+ marked_message_printf (0, 0, raised ? MESSAGE_RAISE_TRANSIENT_GROUP:MESSAGE_MAP_TRANSIENT_GROUP,
elem->number, window_name (win), g->name);
else
- marked_message_printf (0, 0, MESSAGE_RAISE_WINDOW_GROUP,
+ marked_message_printf (0, 0, raised ? MESSAGE_RAISE_WINDOW_GROUP:MESSAGE_MAP_WINDOW_GROUP,
elem->number, window_name (win), g->name);
}
}
@@ -196,7 +197,7 @@ map_request (XEvent *ev)
|| (rp_honour_normal_raise && !win->transient))
set_active_window (win);
else
- show_rudeness_raise_msg (win);
+ show_rudeness_msg (win, 1);
}
break;
}
@@ -268,7 +269,7 @@ configure_request (XConfigureRequestEvent *e)
}
else if (current_window() != win)
{
- show_rudeness_raise_msg (win);
+ show_rudeness_msg (win, 1);
}
}
diff --git a/src/events.h b/src/events.h
index 838249b..aa23692 100644
--- a/src/events.h
+++ b/src/events.h
@@ -23,4 +23,6 @@
#define _RATPOISON_EVENTS_H 1
void listen_for_events ();
+void show_rudeness_msg (rp_window *win, int raised);
+
#endif /* _RATPOISON_EVENTS_H */
diff --git a/src/manage.c b/src/manage.c
index d787c02..dd5eae9 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -839,14 +839,7 @@ map_window (rp_window *win)
|| (rp_honour_normal_map && !win->transient))
set_active_window (win);
else
- {
- if (win->transient)
- marked_message_printf (0, 0, MESSAGE_MAP_TRANSIENT,
- win->number, window_name (win));
- else
- marked_message_printf (0, 0, MESSAGE_MAP_WINDOW,
- win->number, window_name (win));
- }
+ show_rudeness_msg (win, 0);
}
void
diff --git a/src/messages.h b/src/messages.h
index e8ec126..3e458b5 100644
--- a/src/messages.h
+++ b/src/messages.h
@@ -36,6 +36,8 @@
#define MESSAGE_RAISE_WINDOW_GROUP "Raise request from window %d (%s) in group %s"
#define MESSAGE_MAP_TRANSIENT "New transient window %d (%s)"
#define MESSAGE_MAP_WINDOW "New window %d (%s)"
+#define MESSAGE_MAP_TRANSIENT_GROUP "New transient window %d (%s) in group %s"
+#define MESSAGE_MAP_WINDOW_GROUP "New window %d (%s) in group %s"
#define MESSAGE_PROMPT_SWITCH_TO_WINDOW "Switch to window: "
#define MESSAGE_PROMPT_NEW_WINDOW_NAME "Set window's title to: "