From e6e393a30df164e07967fd673423fbda0e47b24d Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 24 May 2008 16:36:22 +0200 Subject: Add a translators note about not translating the word "SessionLogout" in an error message. --- openbox/actions/session.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openbox') diff --git a/openbox/actions/session.c b/openbox/actions/session.c index 436eb0f5..655aee23 100644 --- a/openbox/actions/session.c +++ b/openbox/actions/session.c @@ -38,6 +38,8 @@ static gboolean prompt_cb(ObPrompt *p, gint result, gpointer data) #ifdef USE_SM session_request_logout(o->silent); #else + /* TRANSLATORS: Don't translate the word "SessionLogout" as it's the + name of the action you write in rc.xml */ g_message(_("The SessionLogout action is not available since Openbox was built without session management support")); #endif } -- cgit v1.2.3 From b6c501cb7cd148fb9beccadcdfc092d1f7d167a4 Mon Sep 17 00:00:00 2001 From: Nico Golde Date: Sun, 13 Jul 2008 15:29:50 +0200 Subject: Properly escape strings before writing XML. --- openbox/session.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'openbox') diff --git a/openbox/session.c b/openbox/session.c index 77dc5de0..811592ec 100644 --- a/openbox/session.c +++ b/openbox/session.c @@ -486,10 +486,14 @@ static gboolean session_save_to_file(const ObSMSaveData *savedata) if (screen_desktop_names) { gint i; + gchar *t; fprintf(f, "\n"); - for (i = 0; screen_desktop_names[i]; ++i) - fprintf(f, " %s\n", screen_desktop_names[i]); + for (i = 0; screen_desktop_names[i]; ++i){ + t = g_markup_escape_text(screen_desktop_names[i], -1); + fprintf(f, " %s\n", t); + g_free(t); + } fprintf(f, "\n"); } @@ -544,8 +548,11 @@ static gboolean session_save_to_file(const ObSMSaveData *savedata) if (c->sm_client_id) fprintf(f, "\n", c->sm_client_id); - else - fprintf(f, "\n", c->wm_command); + else { + t = g_markup_escape_text(c->wm_command, -1); + fprintf(f, "\n", t); + g_free(t); + } t = g_markup_escape_text(c->name, -1); fprintf(f, "\t%s\n", t); -- cgit v1.2.3 From 5b678bdfcf9e21c846d6560badd009484d174a89 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Wed, 22 Oct 2008 21:13:27 +0200 Subject: Make sure the _MOTIF_WM_INFO atom exists. Without this, urxvt won't use motif hints for borderless mode. --- openbox/prop.c | 1 + openbox/prop.h | 1 + 2 files changed, 2 insertions(+) (limited to 'openbox') diff --git a/openbox/prop.c b/openbox/prop.c index 5dc4a2fa..ec1ce3db 100644 --- a/openbox/prop.c +++ b/openbox/prop.c @@ -53,6 +53,7 @@ void prop_startup(void) CREATE(wm_client_leader, "WM_CLIENT_LEADER"); CREATE(wm_transient_for, "WM_TRANSIENT_FOR"); CREATE(motif_wm_hints, "_MOTIF_WM_HINTS"); + CREATE(motif_wm_info, "_MOTIF_WM_INFO"); CREATE(sm_client_id, "SM_CLIENT_ID"); diff --git a/openbox/prop.h b/openbox/prop.h index 46c93017..644717a2 100644 --- a/openbox/prop.h +++ b/openbox/prop.h @@ -55,6 +55,7 @@ typedef struct Atoms { Atom wm_client_leader; Atom wm_transient_for; Atom motif_wm_hints; + Atom motif_wm_info; /* SM atoms */ Atom sm_client_id; -- cgit v1.2.3 From f34b2571b99f40885548fc3ea7c8c5b45ba64335 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 27 Oct 2008 00:10:57 +0100 Subject: Correct a 64-bit bug in event_time_after The code assumed the timestamps had the same domain as the type Xlib uses for them, which is almost never the case with Xlib. Change all involved variables to guint32. --- openbox/event.c | 8 +++++--- openbox/event.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'openbox') diff --git a/openbox/event.c b/openbox/event.c index 3abaa675..5f1ae255 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1999,7 +1999,7 @@ void event_cancel_all_key_grabs(void) XSync(ob_display, FALSE); } -gboolean event_time_after(Time t1, Time t2) +gboolean event_time_after(guint32 t1, guint32 t2) { g_assert(t1 != CurrentTime); g_assert(t2 != CurrentTime); @@ -2012,8 +2012,10 @@ gboolean event_time_after(Time t1, Time t2) - http://tronche.com/gui/x/xlib/input/pointer-grabbing.html */ - /* TIME_HALF is half of the number space of a Time type variable */ -#define TIME_HALF (Time)(1 << (sizeof(Time)*8-1)) + /* TIME_HALF is not half of the number space of a Time type variable. + * Rather, it is half the number space of a timestamp value, which is + * always 32 bits. */ +#define TIME_HALF (guint32)(1 << 31) if (t2 >= TIME_HALF) /* t2 is in the second half so t1 might wrap around and be smaller than diff --git a/openbox/event.h b/openbox/event.h index 93af6b4c..a4bd8865 100644 --- a/openbox/event.h +++ b/openbox/event.h @@ -65,7 +65,7 @@ void event_halt_focus_delay(); /*! Compare t1 and t2, taking into account wraparound. True if t1 comes at the same time or later than t2. */ -gboolean event_time_after(Time t1, Time t2); +gboolean event_time_after(guint32 t1, guint32 t2); Time event_get_server_time(); -- cgit v1.2.3 From c564b6245fcfaf0efd523cfa17bc1a73fe640d68 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 27 Oct 2008 00:51:56 +0100 Subject: Show name/class when mapping in debug mode. --- openbox/client.c | 1 + 1 file changed, 1 insertion(+) (limited to 'openbox') diff --git a/openbox/client.c b/openbox/client.c index 7062cabd..1d78a658 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -312,6 +312,7 @@ void client_manage(Window window, ObPrompt *prompt) ob_debug("Window type: %d\n", self->type); ob_debug("Window group: 0x%x\n", self->group?self->group->leader:0); + ob_debug("Window name: %s class: %s\n", self->name, self->class); /* now we have all of the window's information so we can set this up. do this before creating the frame, so it can tell that we are still -- cgit v1.2.3