From e3134210d820340ef63bb5c21c9a56856147f0a9 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Wed, 5 Nov 2008 19:09:34 +0100 Subject: Using format specifiers without arguments in printf is bad. --- openbox/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbox') diff --git a/openbox/event.c b/openbox/event.c index 5f1ae255..467af11c 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1334,7 +1334,7 @@ static void event_handle_client(ObClient *client, XEvent *e) } else ob_debug_type(OB_DEBUG_APP_BUGS, "_NET_ACTIVE_WINDOW message for window %s is " - "missing source indication\n"); + "missing source indication\n", client->title); client_activate(client, TRUE, TRUE, TRUE, (e->xclient.data.l[0] == 0 || e->xclient.data.l[0] == 2)); -- cgit v1.2.3 From 59eb52b7c6ccbe83742e5eb8b40b5e32bb6600cc Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Wed, 5 Nov 2008 18:48:10 +0100 Subject: Don't move windows to current desktop on net_active_window if the event didn't come from the user. Instead, just activate the flashy thinger. --- openbox/client.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'openbox') diff --git a/openbox/client.c b/openbox/client.c index d6321949..39a03468 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -3904,12 +3904,15 @@ static void client_present(ObClient *self, gboolean here, gboolean raise, client_focus(self); } -/* this function exists to map to the client_activate message in the ewmh, - the user arg is unused because nobody uses it correctly anyway. */ +/* this function exists to map to the net_active_window message in the ewmh */ void client_activate(ObClient *self, gboolean here, gboolean raise, gboolean unshade, gboolean user) { - client_present(self, here, raise, unshade); + if (user || (self->desktop == DESKTOP_ALL || + self->desktop == screen_desktop)) + client_present(self, here, raise, unshade); + else + client_hilite(self, TRUE); } static void client_bring_windows_recursive(ObClient *self, -- cgit v1.2.3 From 98b1c84bb5caca8a5590e40ad4a4f63a9eb2b869 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 10 Nov 2008 23:34:50 +0100 Subject: Fix a problem pointed out by clang openbox/client.c:269:10: warning: incompatible pointer types passing 'gint *', expected 'guint32 *' if (!OBT_PROP_GET32(self->window, NET_WM_USER_TIME, CARDINAL, &user_time)) ^~~~~~~~~~~~~~ --- openbox/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbox') diff --git a/openbox/client.c b/openbox/client.c index 39a03468..03bbfe48 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -247,7 +247,7 @@ void client_manage(Window window, ObPrompt *prompt) gboolean transient = FALSE; Rect place, *monitor; Time launch_time, map_time; - gint user_time; + guint32 user_time; grab_server(TRUE); -- cgit v1.2.3 From e59d06c7f3ede4911c8ab08c101f6b0322a0ea58 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 15 Nov 2008 22:50:16 +0100 Subject: Use ngettext for %d desktop(s). This poses a small problem. We currently let translators reorder this string, but ngettext only takes one numeric argument. This means that you can either get correct pluralization or the order you want, but not both. I fixed up the languages I understand at a very basic level, but the rest will need translator assistance. --- openbox/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbox') diff --git a/openbox/screen.c b/openbox/screen.c index 15b3c8d8..e908cf10 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -409,7 +409,7 @@ void screen_startup(gboolean reconfig) arguments, you can use %1$d for the first one and %2$d for the second one. For example, "The current session has %2$d desktops, but Openbox is configured for %1$d ..." */ - g_warning(_("Openbox is configured for %d desktops, but the current session has %d. Overriding the Openbox configuration."), + g_warning(ngettext("Openbox is configured for %d desktop, but the current session has %d. Overriding the Openbox configuration.", "Openbox is configured for %d desktops, but the current session has %d. Overriding the Openbox configuration.", config_desktops_num), config_desktops_num, d); } screen_set_num_desktops(d); -- cgit v1.2.3