-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
GLFW3.4+ on X11: copy the WM_CLASS property from the parent window for viewports #8474
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
base: docking
Are you sure you want to change the base?
Conversation
|
I tested the Here’s a snippet from my i3 configuration file (each of these rules works): |
|
Deriving the name from the title of the window is something that we cannot change. The creator of the application can set the platform hints for the Changing the WM_CLASS of viewport windows will change how they are treated by other desktop environments/window managers. They will be shown as 2 separate applications which is not what we want. I thought I could add something like In my opinion, appending I don't really know what the solution for this is, except maybe adding the
Also, let's suppose the That is the reason this PR is a partial fix. I really don't know how to fix this for tiling window manager users right now. There is still a big benefit to fixing this for DE users, even if tiling window manager users are still left without good support. My plan is to fix this for tiling window managers when I find a good method to fix it(and get more experience with programming for X11) |
|
FYI merged 6b2cdf2 + minor tweaks 37b18ac from #8884, which seems to resolve the X11 side of this although there are open questions here. I left a comment about Wayland + link to here from the code. What do you think we should do about this commit? |
|
@ocornut I have some concerns about the window types being changed. Link to the window manager specification The specification simply lists these hints and vaguely defines what they mean but it does not force window managers to comply to any set of guidelines. What we're doing here is that we're hoping that the window manager will treat the viewport windows as if they are dialog boxes which may or may not include any number of restrictions to window stacking, selection, decorations and more. I am mostly concerned about a couple of UX issues that are likely to occur:
I think this needs more testing but I doubt that going the path of window hints is the correct decision in this case. Considering the possible risk I think that the best decision would be to revert this commit for now and when we at least have proof that setting this window hint will not go against the expected user experience on popular desktop environments(GNOME, KDE, XFCE, LXDE, LXQt) we can safely merge it back. |
This PR resolves one of the issues listed in #8289. The issue should not be closed, because this PR does not fix all the issues that are still needed to be resolved to mark the PR as complete. I hope to resolve #8289 in followup pull requests in the near future.
This patch makes it possible for dear imgui to copy the
WM_CLASSproperty of a window under X11 when compiled with GLFW version 3.4 and later.This PR does not fix the following:
However, it does fix a number of issues, such as:
Unfortunately, to make this PR possible, the implementation uses the native X11 API, due to GLFW not implementing any method of getting the value of window hints or of its internal structures :/
Testing
Tested this under latest Arch Linux, Ubuntu Linux 24.10 and Ubuntu Linux 24.4. Due to the unavailability of GLFW version 3.4 in Ubuntu 24.04 this patch will not be covered by our Linux CI correctly unfortunately :/