-
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
Relax splash on top #18230
Relax splash on top #18230
Conversation
That sort-of works - at the end of startup, the main window pops in front of the splash screen (obscuring it with a blank window) for a couple of seconds before it resizes to its final dimensions and the splash screen goes away. |
This stuff is all so horribly non-standardized and platform and even window manager specific, so no matter what you do, you won't get any guarantees.
One idea, that avoids tinkering with transient/urgency/type_hint/above/below/focus/lower/restack/etc, is delaying
until everything is ready (including libs/iops/views). Previously you'd want the main window to pop up as early as possible, even when empty, so there would be something showing, but now there's the splash for that... Care needs to be taken; calling show_all later, when all libs etc are added, might unhide stuff that was specifically hidden in the current order. So you need to replace If you do this, There's another critical in Also, obviously, the case where the splash is shown longer for crawling or isn't shown needs to be considered. But with the splash, tested on linux/wayland/windows, showing only the splash until fully ready makes for a smoother experience (for me). |
Separately it might make sense after
otherwise it is confusing/not obvious why that setting is ignored/makes no difference. (#18228) |
47a5daa
to
24af95e
Compare
I had the same thought you did about destroying the splash screen after the crawl if the user pref is to not show it. |
OK, turns out there already was a
immediately after It would be nice to add |
24af95e
to
2bf4674
Compare
All ideas good and have been force-pushed @TurboGit for master it would be both commits, for 5.0.1 only the first one because of strings. |
dt_gui_gtk_load_config(); | ||
gtk_widget_show_all(dt_ui_main_window(darktable.gui->ui)); | ||
// give Gtk a chance to actually process the resizing | ||
dt_gui_process_events(); |
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.
can be removed
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.
You mean removing the dt_gui_process_events();
? I thought so too but then dt hangs .
src/common/darktable.c
Outdated
@@ -1911,6 +1913,8 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load | |||
if(changed_xmp_files) | |||
dt_control_crawler_show_image_list(changed_xmp_files); | |||
|
|||
gtk_widget_show_all(dt_ui_main_window(darktable.gui->ui)); | |||
// give Gtk a chance to actually process the resizing |
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.
referred to process_events which doesn't seem to be needed here.
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.
right, misleading comment
While we possibly spend a lot of time (like in xmp crawler ...) while having the splash screen open users might want to do other work but the splash requested to be "above" prohibits that. So let us **not** interfere in WM/user actions. If we don't enforce the splash via preferences we close it right after the the crawler has done it's noteworthy work. Somewhat smoother splash-closing -> main_window
2bf4674
to
ddcd650
Compare
I was working in parallel to the two of you, so between our two PRs we should be able to get something workable without visual glitches. It turns out that the gtk_widget_show_all in darktable.c isn't actually necessary.... |
You wanna take over? I have to work on a chicken right now, wife is coming home soon :-) |
While we possibly spend a lot of time (like in xmp crawler ...) while having the splash screen open users might want to do other work but the splash requested to be "above" prohibits that.
So let us not interfere in WM/user actions.
See #18209
Other options "how-to-fix" might be
gtk_window_set_keep_above(GTK_WINDOW(splash_screen), FALSE)
after some timeout or alike.