Blender Git Commit Log

Git Commits -> Revision edffb0e

Revision edffb0e by Julian Eisel (master)
October 3, 2019, 15:50 (GMT)
UI: Register File Browser as Child/Dialog-Window for the OS

For many users, this will make the File Browser window behave more like
what they would expect. It addresses the issue of the File Browser
becoming hidden behind the main window by clicking anywhere in the
latter. It communicates the interruptive, but temporary nature of the
operation a bit better.
Further, on tiling window managers the File Browser now opens as
floating by default, like in other applications.

Note that this also makes sure the File Browser is always opened as
separate window, so it doesn't re-use the Preferences, or any other
temporary window anymore. This seems to have been a common annoyance.

More concretely, this makes the File Browser window behave as follows:
* Stays on top of its parent Blender window, but not on top of
non-Blender windows.
* Minimizes with its parent window
* Can be moved independently
* Doesn't add an own item in task bars
* Doesn't block other Blender windows (we may want to have this though)
* Opens as floating window for tiling window managers (e.g. i3wm/Sway)

Further notes:
* When opening a file browser from the Preference window (or any
temporary window), the main window, as the file browsers parent is
moved on top of the Preferences, which makes it seem like the
Preferences were closed. This is the general issue of bad secondary
window handling as window activation changes. I made it so that the
window is moved back once the file browser is closed.
This behavior is confusing and would be nice to avoid. It's a separate
issue though.
* On most window managers on Linux the temporary window can not be
minimized and maximized, they disable that for dialog windows.
* On Windows and macOS, only minimizing is disabled, as there is no
decent way yet to restore a window if it's not shown in the taskbar.

Reviewed By: Brecht van Lommel, Campbell Barton, William Reynish
Edits and macOS implementation by Brecht.

Differential Revision: https://developer.blender.org/D5810

Part of T69652.

Commit Details:

Full Hash: edffb0e9b19db62323b09ea93ce8f234f133656e
Parent Commit: 35ae1da
Lines Changed: +464, -170

27 Modified Paths:

/intern/ghost/GHOST_C-api.h (+13, -0) (Diff)
/intern/ghost/GHOST_ISystem.h (+3, -1) (Diff)
/intern/ghost/GHOST_IWindow.h (+2, -0) (Diff)
/intern/ghost/intern/GHOST_C-api.cpp (+34, -1) (Diff)
/intern/ghost/intern/GHOST_System.h (+0, -8) (Diff)
/intern/ghost/intern/GHOST_SystemCocoa.h (+7, -1) (Diff)
/intern/ghost/intern/GHOST_SystemCocoa.mm (+23, -2) (Diff)
/intern/ghost/intern/GHOST_SystemSDL.cpp (+1, -0) (Diff)
/intern/ghost/intern/GHOST_SystemSDL.h (+1, -0) (Diff)
/intern/ghost/intern/GHOST_SystemWin32.cpp (+5, -3) (Diff)
/intern/ghost/intern/GHOST_SystemWin32.h (+3, -2) (Diff)
/intern/ghost/intern/GHOST_SystemX11.cpp (+5, -3) (Diff)
/intern/ghost/intern/GHOST_SystemX11.h (+2, -1) (Diff)
/intern/ghost/intern/GHOST_Window.h (+5, -0) (Diff)
/intern/ghost/intern/GHOST_WindowCocoa.h (+6, -1) (Diff)
/intern/ghost/intern/GHOST_WindowCocoa.mm (+28, -13) (Diff)
/intern/ghost/intern/GHOST_WindowWin32.cpp (+53, -19) (Diff)
/intern/ghost/intern/GHOST_WindowWin32.h (+6, -4) (Diff)
/intern/ghost/intern/GHOST_WindowX11.cpp (+96, -6) (Diff)
/intern/ghost/intern/GHOST_WindowX11.h (+6, -1) (Diff)
/source/blender/editors/include/ED_screen.h (+2, -1) (Diff)
/source/blender/editors/render/render_view.c (+2, -2) (Diff)
/source/blender/editors/screen/screen_edit.c (+3, -2) (Diff)
/source/blender/editors/screen/screen_ops.c (+24, -9) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+2, -1) (Diff)
/source/blender/windowmanager/intern/wm_window.c (+124, -87) (Diff)
/source/blender/windowmanager/WM_api.h (+8, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021