diff --git a/src/ui/dialog/startup.cpp b/src/ui/dialog/startup.cpp index bc4cabcdee4ccb9653a3b66eb24f2fa90828d8b7..20c2a67aa389668e228280858f38717114de5ef6 100644 --- a/src/ui/dialog/startup.cpp +++ b/src/ui/dialog/startup.cpp @@ -16,6 +16,9 @@ #include #include #include +#ifdef GDK_WINDOWING_WAYLAND +#include +#endif #include #include #include @@ -164,7 +167,18 @@ StartScreen::StartScreen() void StartScreen::show_now() { - set_default_size(700, 0); + int default_height = 0; // 0 = automatic size +#ifdef GDK_WINDOWING_WAYLAND + if (GDK_IS_WAYLAND_DISPLAY(this->get_display()->gobj())) { + // Workaround: On Wayland, the splash screen is initially centered but then does not re-center when it increases + // height to become the welcome dialog. As a result, the welcome dialog is so off-center that the lower buttons + // are cut off. To work around, we request a larger initial height even if this makes the splash screen look ugly + // due to lots of empty space at the bottom. + // https://gitlab.com/inkscape/inkscape/-/issues/5692 + default_height = 600; + } +#endif + set_default_size(700, default_height); set_resizable(false); // Show the main banner when already welcomed for the first time