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:
Rob Adams 2003-05-29 17:16:22 +00:00 committed by Rob Adams
parent 59958b0f0a
commit 0fa4954c46
3 changed files with 35 additions and 7 deletions

View File

@ -1,3 +1,16 @@
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.
2003-05-20 Havoc Pennington <hp@pobox.com> 2003-05-20 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (meta_change_keygrab): the mask * src/keybindings.c (meta_change_keygrab): the mask

View File

@ -112,6 +112,9 @@ main (int argc, char **argv)
meta_set_debugging (TRUE); meta_set_debugging (TRUE);
meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL); meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL);
if (g_get_home_dir ())
chdir (g_get_home_dir ());
{ {
char buf[256]; char buf[256];
GDate d; GDate d;

View File

@ -217,11 +217,25 @@ window_is_fullscreen_size (MetaWindow *window)
return FALSE; 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 */ /* Get layer ignoring any transient or group relationships */
static MetaStackLayer static MetaStackLayer
get_standalone_layer (MetaWindow *window) get_standalone_layer (MetaWindow *window)
{ {
MetaStackLayer layer; MetaStackLayer layer;
gboolean focused_transient = FALSE;
switch (window->type) switch (window->type)
{ {
@ -242,14 +256,12 @@ get_standalone_layer (MetaWindow *window)
break; break;
default: default:
meta_window_foreach_transient (window,
is_focused_foreach,
&focused_transient);
#if 0 if ((window->has_focus || focused_transient ||
if (window->has_focus && (window == window->display->expected_focus_window)) &&
meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
layer = META_LAYER_FOCUSED_WINDOW;
#endif
if (window->has_focus &&
(window->fullscreen || window_is_fullscreen_size (window))) (window->fullscreen || window_is_fullscreen_size (window)))
layer = META_LAYER_FULLSCREEN; layer = META_LAYER_FULLSCREEN;
else if (window->wm_state_above) else if (window->wm_state_above)