Skip to content
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

The buttons are behind the title bar #2598

Open
ghost opened this issue Jun 17, 2021 · 13 comments
Open

The buttons are behind the title bar #2598

ghost opened this issue Jun 17, 2021 · 13 comments

Comments

@ghost
Copy link

ghost commented Jun 17, 2021

Describe the bug
Look precisely under the titlebar,the buttons that I need to configure dosbox-x are behind the titlebar:
image

To Reproduce
Steps to reproduce the behavior:
Start dosbox-x

Environment (please complete the following information):
Arch kde wayland.
Newest dosbox-x.

@rderooy
Copy link
Contributor

rderooy commented Jun 17, 2021

@Toadfield does the SDL2 version work better?

@ghost
Copy link
Author

ghost commented Jun 17, 2021

yes

@ghost
Copy link
Author

ghost commented Jun 17, 2021

But that also has graphical bugs
image
image
image

@rderooy
Copy link
Contributor

rderooy commented Jun 17, 2021

Are you running the SDL2 version using XWayland or as a native Wayland app?
Normally the SDL2 version should default to XWayland (X11), but you can force SDL2 apps to use one or the other with the SDL_VIDEODRIVER=wayland or SDL_VIDEODRIVER=x11 environment variable.

e.g.

SDL_VIDEODRIVER=wayland dosbox-x

The SDL1 version can only run via XWayland, as SDL1 has no wayland support at all. The SDL2 libs do have some wayland support, but there are still issues, which is why SDL2 normally still defaults to X11 even on Wayland.

@grapeli
Copy link

grapeli commented Jun 17, 2021

It can only run on wayland using sdl12-compat. The dosbox-x condition must be built with the dynamic SDL1 library (not statically linked).

dosbox-x.SDL1.wayland.mp4

It is only a matter of time before wayland becomes the default. If not in the upcoming edition then in the next one.
libsdl-org/SDL#4306

Many of these bugs are a matter of the WM used. Not all are KDE and Gnome supporters. It is also worth testing on something else - a very popular Sway.
I do not see such errors under the Sway on SDL2. Although it has a few less annoying.
It's worth starting a thorough testing of dosbox-x (SDL2) under wayland. As well as under SDL_VIDEODRIVER=kmsdrm.
Dosbox-X is heavily tuned for X. For example in this file:
https://github.com/joncampbell123/dosbox-x/blob/master/src/gui/sdlmain_linux.cpp

@rderooy
Copy link
Contributor

rderooy commented Jun 17, 2021

@grapeli I don't think your statements are completely correct. For instance the sdlmain your linking to is part of the modified SDL1 fork that is included with DOSBox-X. To my understanding it is not used when you build for SDL2.

Here is dosbox-x SDL2 running in wayland mode on Gnome 40.2
image

As you can see all window decorations are missing, as SDL2 has not yet implemented CSD (Client-Side Decorations), and Gnome has not implemented (and has no intention of implementing) the optional SSD (Server-Side Decorations) extension.

Once the libdecoration patch is merged in SDL2 and a new version is released of SDL2, SDL2 applications on Gnome will have window decorations again. In KDE you do get decorations in Wayland mode, since KDE supports the optional SSD extension.

@grapeli
Copy link

grapeli commented Jun 17, 2021

@rderooy
I know how I built dosbox-x. I was building it without the SDL1 library included.
https://fedoraproject.org/wiki/Changes/SDL12onSDL2
"Benefit to Fedora
Automatic support for Wayland with SDL 2.0.16+"

There is no problem with window decorations under Sway (as far as I know under KDE).
I recommend. Run it.

I have been using the X11 application for a long time. They never had decorations. This has always been the responsibility of the window manager (WM). Run any X11 application on xorg without WM. There will be no decorations either.

@rderooy
Copy link
Contributor

rderooy commented Jun 18, 2021

@grapeli I have been working with Unix and Linux systems longer than most. I have used Motif for instance, and built my own Linux 0.9 kernels. I know that on X11 the window manager is responsible for the window decorations and if you don't have a window manager you don't have decorations.

But that was not the point. My point was that on Wayland it no longer works the same way, and unless your chosen Wayland compositor implements the optional Wayland SSD extension, you will not have any window decorations, as is the case for Gnome and Enlightenment. In that case the SDL2 library would have to provide decorations, for which there is an open PR: libsdl-org/SDL#4068

@grapeli
Copy link

grapeli commented Jun 18, 2021

@rderooy
Window decorations for wayland are under Sway and KDE. That their Gnome is gone? This is a problem for Gnome users.
Decoration is the least important thing from my point of view. For me, it is important that the application that I run works stably and correctly. Only this.
I don't know how many dosbox-x users only use it in fullscreen. I always do it when I play games.

For many years I have been a user of notion (ion3) and i3 for some time also Sway. Their window decorations are devoid of the minimize and close function. Somehow I do not miss it.

@grapeli
Copy link

grapeli commented Jun 18, 2021

@rderooy
I very often give up window decorations in order to gain additional space on the screen.
Maybe with dosbox-x it's not that important.
Without decorations, I lose little or nothing. I can have the window title in the bar status.

dosbox-x.i3.mp4

@ghost
Copy link
Author

ghost commented Jun 18, 2021

I tested it,those bugs also happen on xorg session.

@grapeli
Copy link

grapeli commented Jun 19, 2021

@Toadfield
Dosbox-X has nothing to decorate your windows.

Out of curiosity, I ran dosbox-x under KDE in archlinux.
Nothing of the sort occurs with me. It also works fine in a wayland session. Of course there are decorations under KDE (wayland).

kde.archlinux.dosbox-x.sdl2.mp4

edit:
I don't know how to make a video of a wayland KDE session.
The dosbox-x (wayland) window has the correct decorations but does not keep its size. Every time it loses focus if the window is not maximized, you have to restore the default sizes (reset window size, F12 + backspace). There are no such symptoms under xwayland.

dosbox-x SDL2 wayland kde

@ghost
Copy link
Author

ghost commented Jun 23, 2021

I know reinstalled arch cause I broke it and when I start dosbox-x now,then I don't see it at all,the window just doesn't show up even though I can see that it is opened in the task bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants