main: Make sure that --mode parameter is valid

Instead of falling back to a set of default values or crashing the
window manager when an invalid mode is specified, check the value
of the ShellGlobal:session-mode property before taking over as WM
and make a clean exit if it cannot be resolved to an existent mode.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
This commit is contained in:
Florian Müllner
2012-05-18 23:57:04 +02:00
parent 3d26224180
commit a7a46bbe1c
4 changed files with 27 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ void _shell_global_set_plugin (ShellGlobal *global,
GjsContext *_shell_global_get_gjs_context (ShellGlobal *global);
gboolean _shell_global_has_valid_session_mode (ShellGlobal *global);
gboolean _shell_global_check_xdnd_event (ShellGlobal *global,
XEvent *xev);