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

Some dialogue windows are not floating in tiling window managers #392

Open
3 tasks done
ChloeZamorano opened this issue Aug 25, 2024 · 1 comment
Open
3 tasks done
Labels
System: Linux For Linux/BSD distributions Type: Bug Something isn't working as intended Type: UI/UX User interface and/or user experience

Comments

@ChloeZamorano
Copy link

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

TagStudio Version

Alpha v9.3.2

Operating System & Version

Linux Mint 21.3 x64 (5.15.0-118-generic kernel) + bspwm

Description

Windows that should be dialogs such as "Create tag" or "Add field" are not treated as such by Xorg based tiling window managers like bspwm or i3. Presumably the same problem would be seen on Wayland managers but I have not tested for that and I'm unfamiliar with Wayland protocols.

So far only seen in bspwm, but it should apply to any tiling window manager, at least on the Xorg side. My initial presumption for this is that Qt is not giving these windows the _NET_WM_WINDOW_TYPE_DIALOG indicated in the EWMH standard, and therefore the window manager isn't told to handle it any different from the main window.

I'm willing to attempt fixing this issue myself, but I'd need to be told the basics of how the UI is supposed to be laid out in the code and look into how Qt handles EWMH hints, it probably uses a separate data type entirely for such windows.

Expected Behavior

Dialogs are expected to spawn as a floating window on top of the main window with the size specified by the program as seen bellow. This screenshot was taken after manually setting the dialog to be floating since bspwm provides a way to do that.

image

Steps to Reproduce

  1. Install TagStudio on a system that uses a tiling window manager.
  2. Run TagStudio under a session of such a window manager.
  3. Open any sort of popup or dialog in the program.

The result should look something like this:
image

Logs

No response

@ChloeZamorano ChloeZamorano added the Type: Bug Something isn't working as intended label Aug 25, 2024
@CyanVoxel CyanVoxel added Type: UI/UX User interface and/or user experience System: Linux For Linux/BSD distributions labels Aug 25, 2024
ChloeZamorano added a commit to ChloeZamorano/TagStudio that referenced this issue Sep 7, 2024
I could not find in the documentation a list of what files are for dialog windows or anything along those lines, so I searched for instances of `self.setWindowModality` and as far as I'm seeing, it looks like that's all of them?
In any case, all I did was add `self.setWindowFlags(Qt.Dialog)` to the init functions of every modal I found that calls setWindowModality, the files affected are:
- add_field.py
- file_extension.py
- fix_dupes.py
- fix_unlinked.py
- folders_to_tags.py
- mirror_entities.py
- panel.py
- progress.py

Do let me know if I missed any or if some of these shouldn't be changed.

This fix has not been tested on Wayland yet, but based on the assumption that Qt behaves the same on both display servers, it should work the same, as this is a very basic feature that both display servers should have.

This fix is for [issue TagStudioDev#392](TagStudioDev#392)
@ChloeZamorano
Copy link
Author

Made the pull request #464 for this issue.
It doesn't have any merge conflicts and only adds self.setWindowFlags(Qt.Dialog) to some files chosen by searching for self.setWindowModality.
Not tested on Wayland but it's very unlikely to not work with it.
It may not be every file that needs this fix, and there might be one or two files changed that shouldn't have it, those more familiar with this code base should be able to tell right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
System: Linux For Linux/BSD distributions Type: Bug Something isn't working as intended Type: UI/UX User interface and/or user experience
Projects
None yet
Development

No branches or pull requests

2 participants