mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
change how focusing windows on initial map works, so that we only steal
2002-05-24 Havoc Pennington <hp@pobox.com> * src/window.c (meta_window_show): change how focusing windows on initial map works, so that we only steal focus from our transient parent or from a panel/desktop, never from other normal windows.
This commit is contained in:
parent
30ff4540d0
commit
4f70698493
@ -1,3 +1,10 @@
|
||||
2002-05-24 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/window.c (meta_window_show): change how focusing windows
|
||||
on initial map works, so that we only steal focus from our
|
||||
transient parent or from a panel/desktop, never from other
|
||||
normal windows.
|
||||
|
||||
2002-05-24 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/window.c (meta_window_configure_request): modify to ignore
|
||||
|
25
src/window.c
25
src/window.c
@ -1337,10 +1337,31 @@ meta_window_show (MetaWindow *window)
|
||||
/* don't focus these */
|
||||
break;
|
||||
case META_WINDOW_NORMAL:
|
||||
/* Focus only if the current focus is on a desktop element
|
||||
* or nonexistent.
|
||||
*
|
||||
* (using display->focus_window is a bit of a race condition,
|
||||
* but I have no idea how to avoid it)
|
||||
*/
|
||||
if (display->focus_window == NULL ||
|
||||
(display->focus_window &&
|
||||
(display->focus_window->type == META_WINDOW_DOCK ||
|
||||
display->focus_window->type == META_WINDOW_DESKTOP)))
|
||||
meta_window_focus (window,
|
||||
meta_display_get_current_time (window->display));
|
||||
break;
|
||||
case META_WINDOW_DIALOG:
|
||||
case META_WINDOW_MODAL_DIALOG:
|
||||
meta_window_focus (window,
|
||||
meta_display_get_current_time (window->display));
|
||||
/* Focus only if the transient parent has focus */
|
||||
/* (using display->focus_window is a bit of a race condition,
|
||||
* but I have no idea how to avoid it)
|
||||
*/
|
||||
if (display->focus_window == NULL ||
|
||||
(display->focus_window &&
|
||||
meta_window_is_ancestor_of_transient (display->focus_window,
|
||||
window)))
|
||||
meta_window_focus (window,
|
||||
meta_display_get_current_time (window->display));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user