-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
splash screen without forced keep-above #18236
base: master
Are you sure you want to change the base?
Conversation
Won't this cause problems if users start editing (potentially based on outdated database contents, and then modifying darktable's database + overwriting the externally modified, not yet scanned XMP) while dt is checking if XMPs have changes that are not yet in the DB? |
The crawler is a foreground process - you can't do anything until it completes, and then you have a fraction of a second before the dialog appears in which you might be able to select an image.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this PR I don't have the UI displayed at all. I'm using an external screen on a notebook.
Does the main window show if you comment out the gtk_widget_set_visible(..., FALSE) added to gtk.c? Unfortunately, there's no portable way to send a window to the back and we've already established that unminimize doesn't work on some systems if I try hiding the main window by minimizing it.... |
Yes, in that case I do see the splash screen and the application main windows. |
Trying a different approach to keep the main window from obscuring the splash screen. GTK docs say the raise request may fail to work with some window managers, though it does prevent visual glitches with KDE's Plasma. |
New commit with an alternate approach to hiding main window until ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two comments I thought I submitted yesterday were still "pending". Let me know if they are clear or if it would be useful for me to reformulate based on latest commit.
darktable_splash_screen_destroy(); | ||
// unhide the main window and restore its geometry to that saved in the config file | ||
gtk_widget_set_visible(dt_ui_main_window(darktable.gui->ui), TRUE); | ||
dt_gui_gtk_load_config(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If done in this order, I get, on windows
- splash screen disappears
- 1 second nothing
- window opens in old location
- window maximizes or goes full screen
if instead I do
// unhide the main window and restore its geometry to that saved in the config file
dt_gui_gtk_load_config();
gtk_widget_show_all(dt_ui_main_window(darktable.gui->ui));
darktable_splash_screen_destroy();
then the splash screen is instantaneously replaced by the window in its final location.
The gtk_widget_show_all
and gtk_widget_set_visible(FALSE)
(=hide) in _init_widgets
is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the gtk_widget_show_all
from _init_widgets
restults in half a dozen assertion failure messages from Gdk, because various items in the main window haven't been realized yet (they don't get created until the main window is initially shown).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make the code more robust by adding the appropriate checks rather than implementing more workarounds?
dterrahe@40fce3c generates no warnings for me, on debian (x&wayland, under WSL2) and windows.
Unfortunately, if dt_gui_gtk_load_config
is moved before show_all
, when restoring a maximized state, the application thinks it is maximized, but the window manager disagrees. Even if dt_gui_gtk_load_config
is executed both before and after show_all
(presumably for an "already maximized" window, maximize is a noop). So there is still a very minimal/undiscernible amount of flashing when showing the screen. But no second or so gap between the splash disappearing and the main window appearing and also no overlap.
EDIT: if you still do see assertions, please let me know which so I can look into them.
Since setting the main window invisible results in it never showing on some systems, try raising the splash screen (once) to keep the main window from obscuring the splash instead of hiding the main window.
Pushed an update in 3274c28 that resolves the issue that the lighttable culling widgets are permanently attached to the central view overlay and would get unhidden by a late |
Alternative to #18230, resolves #18239, resolves #18209. I managed to eliminate the flash of an empty main window covering the splash screen.
Also a bit of cleanup, removing old commented-out code.