diff options
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/actions/session.c | 2 | ||||
| -rw-r--r-- | openbox/client.c | 1 | ||||
| -rw-r--r-- | openbox/event.c | 8 | ||||
| -rw-r--r-- | openbox/event.h | 2 | ||||
| -rw-r--r-- | openbox/session.c | 15 |
5 files changed, 20 insertions, 8 deletions
diff --git a/openbox/actions/session.c b/openbox/actions/session.c index a70aee50..e9cc40db 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 } diff --git a/openbox/client.c b/openbox/client.c index 0ccb343b..ab00cd0d 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -232,6 +232,7 @@ void client_manage(Window window, ObPrompt *prompt) ob_debug("Window type: %d", self->type); ob_debug("Window group: 0x%x", self->group?self->group->leader:0); + ob_debug("Window name: %s class: %s", 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 diff --git a/openbox/event.c b/openbox/event.c index aca69cc3..44b6eb70 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -2021,7 +2021,7 @@ void event_cancel_all_key_grabs(void) XSync(obt_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); @@ -2034,8 +2034,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 ba5a03ea..fb8bb075 100644 --- a/openbox/event.h +++ b/openbox/event.h @@ -60,7 +60,7 @@ void event_halt_focus_delay(void); /*! 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(void); diff --git a/openbox/session.c b/openbox/session.c index db62589a..d1a3f99b 100644 --- a/openbox/session.c +++ b/openbox/session.c @@ -490,10 +490,14 @@ static gboolean session_save_to_file(const ObSMSaveData *savedata) if (screen_desktop_names) { gint i; + gchar *t; fprintf(f, "<desktopnames>\n"); - for (i = 0; screen_desktop_names[i]; ++i) - fprintf(f, " <name>%s</name>\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, " <name>%s</name>\n", t); + g_free(t); + } fprintf(f, "</desktopnames>\n"); } @@ -548,8 +552,11 @@ static gboolean session_save_to_file(const ObSMSaveData *savedata) if (c->sm_client_id) fprintf(f, "<window id=\"%s\">\n", c->sm_client_id); - else - fprintf(f, "<window command=\"%s\">\n", c->wm_command); + else { + t = g_markup_escape_text(c->wm_command, -1); + fprintf(f, "<window command=\"%s\">\n", t); + g_free(t); + } t = g_markup_escape_text(c->name, -1); fprintf(f, "\t<name>%s</name>\n", t); |
