From: Dana Jansens Date: Mon, 14 Dec 2009 23:29:14 +0000 (-0500) Subject: Merge branch 'backport' into 3.4-working X-Git-Tag: release-3.4.9~4 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=39db173f222a81c625b10442db609fba3d81f6b3;p=dana%2Fopenbox.git Merge branch 'backport' into 3.4-working --- 39db173f222a81c625b10442db609fba3d81f6b3 diff --cc openbox/openbox.c index 0d48990a,0e339782..6f0e6413 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@@ -559,10 -570,23 +570,23 @@@ static void remove_args(gint *argc, gch *argc -= num; } -static void parse_env() +static void parse_env(void) { + const gchar *id; + /* unset this so we don't pass it on unknowingly */ unsetenv("DESKTOP_STARTUP_ID"); + + /* this is how gnome-session passes in a session client id */ + id = g_getenv("DESKTOP_AUTOSTART_ID"); + if (id) { + unsetenv("DESKTOP_AUTOSTART_ID"); + if (ob_sm_id) g_free(ob_sm_id); + ob_sm_id = g_strdup(id); + ob_debug_type(OB_DEBUG_SM, + "DESKTOP_AUTOSTART_ID %s supercedes --sm-client-id\n", + ob_sm_id); + } } static void parse_args(gint *argc, gchar **argv) @@@ -719,13 -743,17 +743,17 @@@ Cursor ob_cursor(ObCursor cursor return cursors[cursor]; } - KeyCode ob_keycode(ObKey key) + gboolean ob_keycode_match(KeyCode code, ObKey key) { + KeyCode *k; + g_assert(key < OB_NUM_KEYS); - return keys[key]; + for (k = keys[key]; *k; ++k) + if (*k == code) return TRUE; + return FALSE; } -ObState ob_state() +ObState ob_state(void) { return state; } diff --cc openbox/screen.h index 1479db16,4a8d8a1e..9584e9c4 --- a/openbox/screen.h +++ b/openbox/screen.h @@@ -134,9 -134,12 +134,12 @@@ gboolean screen_physical_area_monitor_c */ guint screen_find_monitor(Rect *search); + /*! Finds the monitor which contains the point @x, @y */ + guint screen_find_monitor_point(guint x, guint y); + /*! Sets the root cursor. This function decides which cursor to use, but you gotta call it to let it know it should change. */ -void screen_set_root_cursor(); +void screen_set_root_cursor(void); /*! Gives back the pointer's position in x and y. Returns TRUE if the pointer is on this screen and FALSE if it is on another screen. */