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 windows that "want" floating are tiled by default #1182
Comments
[Original comment by TonyC] In the first case, I don't think it is obvious that the window manager should be handling these hints, but maybe a case could be made for it. Even the spec says that _NEW_WM_TYPE_NOTIFICATION is typically used with the override-redirect hint. For example, the _NET_WM_STATE_MODAL seems like it should be floated because they are a kind of dialog box. But I think _NET_WM_STATE_SKIP_PAGE also needs some kind of argument for why those windows should be floated. |
[Original comment by kerncece@…] Now, what do applications set these E_WM_H hints for if not for the window manager? Indeed, the spec says typically. But not necessarily (as otherwise override-redirect would be inferred and e.g. not have to be set with GDK function after the window has been realized ← additional complexity). What if i3 does already check the type hint when deciding whether the window I'm not certain about _NET_WM_STATE_SKIP_TASKBAR/PAGER, but the only windows I know set this are transient DIALOGs (and NOTIFICATIONs, SPLASH screens, the DESKTOP, DOCKs, ...) and windows I set this manually for with Ordinarily, yes, windows that set _NET_WM_STATE_SKIP_TASKBAR/PAGER also set an appropriate type hint, but this may escape the mind of an unpedantic programmer who just uses their This brings me to conclusion: Programmers make errors. Will we stumble over every one of them (and firmly insist that the onus is solely on the authors to correct them), or will we be fuzzy enough to handle the small flaws gracefully?
The associated code is attempted in patch #421. The rationale for floating windows with equal min and max size hints is here: |
Replying to comment 2 by kerncece@…:
I also commented on the patch you submitted. Feel free to follow up with a patch for the clear cases (i.e. windows with equal min and max size and modal windows). |
[Original comment by kerncece@…] How can you be so blunt about app authors' mistakes. :(
How is it not clear what the user wants? Not all libraries are made perfectly convenient to use. So neither should we be? And sorry, but you got it backwards: It's just one window manager and all other apps. Discounting other tiling WMs, only i3 has this kind of a problem. :-) And on what anecdotal evidence do you base your firm resolution that fixed-size windows should be afloat? |
[Original comment by TonyC] Replying to comment 4 by kerncece@…:
That is not a difficult argument to make if you think it through. According to the spec,
Here, "non-resizable" means "cannot be resized". Tiling a window generally resizes it. Therefore if the non-resizable aspect of the window is to be honored, it cannot be a tiling window. A window that is not a tiling window is a floating window. # We don't require a formal mathematical proof for all feature requests, but sometimes we ask that you make a convincing argument for your use case. :) In the case of notifications, my present thinking is both that they should not be managed and that if one accidentally asks to be, it should be set to floating. But I am not enough of an expert on software project management to understand the general implications of the assumptions implicit within that statement. I have, however, had the experience of a project blowing up on me because of a lot of hacky code. |
[Original comment by kerncece@…] I understand. Thanks. I propose, in addition to the agreed upon, that we also float NOTIFICATION and MENU. Here is why: Most FOSS GUI software is written in (usually) one of the popular toolkits: GTK+, Qt, Tk, wxWidgets, ... The problem? GTK+ doesn't seem to wrap notifications in any way. There is not a GtkNotification. And not everyone uses libnotify, it seems. Windows that are purported to be notification windows — set the appropriate type hint, renounce decorations, and position themselves absolutely, among other features, do not behave like notification windows only because the stupid programmer wasn't aware at the time, that in order to satisfy some exotic tiling WM they never heard of, they should be setting the override-redirect flag, on a GdkWindow after their widget is realized, preferably in a callback. Similarly, GDK_WINDOW_TYPE_HINT_MENU is used in the wild (most results are dupes, though). While GTK internally uses DROPDOWN_MENU and POPUP_MENU on associated (override-redirect) widgets, MENU is left hanging. While the specification is clear: it doesn't say anything about floating, but it describes what a MENU is: "pinnable menu windows, respectively (i.e. toolbars and menus "torn off" from the main application)". Now if these are better tiled to a third of my screen than floated, I apologize for not seeing it. On additional note, MENU is given the same paragraph as TOOLBAR. The thing is, as I see it, and I'm fairly new to this, we have a tiling WM here. Obviously normal rules about sizing and positioning windows don't apply. While there is abundant specification covering all the former aspects, there is nothing in EWMH about floating vs. tiling. The issue is strangely not explicitly covered or foresighted by the specification. This is why I say we have to rely on "common sense" (not what the spec expressively demands, but also how it interprets) and look at things as used in practice and how they make sense. Please also answer my pending question in the CR, particularly the one about TODO. :) Thank you. |
[Original comment by kerncece@…] I uploaded a new patch, #427. It incorporates your feedback from the previous one and floats windows according to agreed upon conditions. Since all our current thinking seem to be in accord, I took the liberty to add notifications in as well. If that line is disputable and is the only one as such, you are welcome to merge without it. Thanks. :) |
[Original comment by Kernc] This ticket was fixed in commit http://c.i3wm.org/8ed95ae5:
|
[Originally reported by kerncece@…]
(Some windows that set window type hint to other than DIALOG (e.g. _NET_WM_WINDOW_TYPE_NOTIFICATION) are tiled instead of floating by default.
Also some windows that provide type hint _NET_WM_WINDOW_TYPE_NORMAL but have a state hint _NET_WM_STATE_MODAL, or _NET_WM_STATE_SKIP_PAGER, ... These should be floated as well.
The text was updated successfully, but these errors were encountered: