mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
chdir to the user's home directory on startup. See #113755.
2003-05-29 Rob Adams <robadams@ucla.edu> * src/main.c (main): chdir to the user's home directory on startup. See #113755. * src/stack.c (get_standalone_layer): a window should be in the fullscreen layer if it or any of its transient descendants are focused or expecting the focus and it is either fullscreen or fullscreen sized. Fix for #104369. * src/stack.c (is_focused_foreach): foreach used by get_standalone_layer to find focused transient descendants.
This commit is contained in:
@ -112,6 +112,9 @@ main (int argc, char **argv)
|
||||
meta_set_debugging (TRUE);
|
||||
meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL);
|
||||
|
||||
if (g_get_home_dir ())
|
||||
chdir (g_get_home_dir ());
|
||||
|
||||
{
|
||||
char buf[256];
|
||||
GDate d;
|
||||
|
26
src/stack.c
26
src/stack.c
@ -217,11 +217,25 @@ window_is_fullscreen_size (MetaWindow *window)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_focused_foreach (MetaWindow *window,
|
||||
void *data)
|
||||
{
|
||||
if (window->has_focus ||
|
||||
(window == window->display->expected_focus_window))
|
||||
{
|
||||
*((gboolean*) data) = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Get layer ignoring any transient or group relationships */
|
||||
static MetaStackLayer
|
||||
get_standalone_layer (MetaWindow *window)
|
||||
{
|
||||
MetaStackLayer layer;
|
||||
gboolean focused_transient = FALSE;
|
||||
|
||||
switch (window->type)
|
||||
{
|
||||
@ -242,14 +256,12 @@ get_standalone_layer (MetaWindow *window)
|
||||
break;
|
||||
|
||||
default:
|
||||
meta_window_foreach_transient (window,
|
||||
is_focused_foreach,
|
||||
&focused_transient);
|
||||
|
||||
#if 0
|
||||
if (window->has_focus &&
|
||||
meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
|
||||
layer = META_LAYER_FOCUSED_WINDOW;
|
||||
#endif
|
||||
|
||||
if (window->has_focus &&
|
||||
if ((window->has_focus || focused_transient ||
|
||||
(window == window->display->expected_focus_window)) &&
|
||||
(window->fullscreen || window_is_fullscreen_size (window)))
|
||||
layer = META_LAYER_FULLSCREEN;
|
||||
else if (window->wm_state_above)
|
||||
|
Reference in New Issue
Block a user