Hacker News new | ask | show | jobs
by Crysstalis 1401 days ago
>Window manager support for some common messages/hints (ala EWMH) so that the window manager is responsible for telling applications how to scale

Adding this to X window managers would be a flawed and inferior experience, this method would only work correctly with composited X or with XWayland.

>For example i prefer to have tearing on my desktop... In all cases, tearing is controllable through the vblank_mode setting via the .drirc file in your home directory

>Well, yes, it is your problem

This is also doing the same thing that the parent post is asking you not to do. It is not moving the discussion forward. The rest of your comment has very little in the way of meaningful suggestions that I can parse, you could have edited it down to maybe 4 or 5 sentences and gotten your point across.

1 comments

> Adding this to X window managers would be a flawed and inferior experience, this method would only work correctly with composited X or with XWayland.

You'll need to explain why and how it is "flawed and inferior", because the way i see it a Window Manager is responsible for managing windows and has an overview of all (toplevel) windows on the system (as a result of being responsible for them) and its placement and setup (e.g. in which monitor it is, what state -minimized, rolled up, maximized, etc- it is, etc). As such, like how it moves windows around, updates its state (minized, rolled, etc) it can also update the window's scale factor.

The main difference here is that the window needs to know how to scale itself, but this isn't that different from knowing how to handle arbitrary sizes when getting resized.

The idea isn't that weird (and honestly Windows does something similar so toolkits that work on Windows would need little change to support the same functionality on X):

1. Applications/toolkits that do not support the protocol will be scaled by the window manager, if possible (via, e.g, composition, note that a window can be composed without composing the full desktop - though there might be some corner cases here that need tweaks on the X server - a full desktop compositor will have no issues here however)

2. Applications/toolkits that do support the protocol but are running under a window manager that doesn't support it will do their scaling themselves by using the appropriate X APIs (RandR provides per-output DPI info that can be scaled, though a toolkit can also have user-wide settings for providing DPI-independent scaling settings per monitor) and geometry notifications

3. Applications/toolkits that do support the protocol and are running under a window manager that does support it (which can be known by a root window attribute and the application can also use a window attribute to specify that the window "speaks" the protocol) will receive scaling events from the window manager. The logic for these scaling values would be up to the window manager (e.g. per-output, per-monitor, per-application scaling but also could be some option in a context menu in the titlebar that provides scaling values and/or have some shortcut keys to scale up/down).

For #3 there could also be a message for the window manager to request scaling for a window so that, e.g. something like xdotool could provide such requests via the command like.

> It is not moving the discussion forward. The rest of your comment has very little in the way of meaningful suggestions that I can parse, you could have edited it down to maybe 4 or 5 sentences and gotten your point across.

Then i suggest making better effort towards understanding what others write or at least ask clarifications (like i did at my first response in this comment) because making the assumption that it doesn't move a discussion forward.

>You'll need to explain why and how it is "flawed and inferior"

Because it needs special support in the window manager. At that point it is the same as what Wayland is doing except it still has all the other flaws of X11 and it will break when someone wants to disable compositing or use another old window manager. As for the other parts, those would technically work, and it already does work like that for the most part. Most programs that can do DPI scaling do already have a way to scale themselves. But that is not a good experience for users, the point of it working seamlessly is to have support for it built into the window manager.

>Then i suggest making better effort towards understanding what others write or at least ask clarifications

There are no clarifications to ask, you are repeating the same comments that get posted all the time. Keep in mind these are the type of comments that you can see repeated very often:

"I have no problem, it works on my hardware"

"It is not a problem because I personally prefer it this way"

"Just try to fix the problem yourself by tweaking these developer settings (config files, environment variables, etc) and hoping it works"

If your comment follows this pattern then I would say just avoid making that comment, it is not moving the discussion forward. I think you can agree, when building these systems the goal is to get something that is usable out of the box for everyone. So these comments do not "move the needle" towards that, these are just reinforcing the current status quo.

> Because it needs special support in the window manager. At that point it is the same as what Wayland is doing except it still has all the other flaws of X11 and it will break when someone wants to disable compositing or use another old window manager.

But it also does not rely on Wayland and all the flaws it has - after all my point was about being possible on X11, not about Wayland. Wayland had nothing to do with the post i wrote.

> But that is not a good experience for users, the point of it working seamlessly is to have support for it built into the window manager.

Yes, which is exactly what i wrote in my original message: "Window manager support for some common messages/hints (ala EWMH) so that the window manager is responsible for telling applications how to scale would improve things".

> There are no clarifications to ask, you are repeating the same comments that get posted all the time [...] If your comment follows this pattern then I would say just avoid making that comment

I suggest try to actual read what people are writing instead of trying to pattern match answers to whatever you think the poster is writing. This may also help understand what i write in my other replies about backwards compatibility.

>after all my point was about being possible on X11

Well my point was that it will always be an inferior experience on X11 even though it technically is possible in some circumstance. WM hints only work correctly if the window manager is compositing which many window managers are not, or do not want to add, and some X11 users still seem to insist on not using them... Any attempts to add this to X11 are fighting an uphill battle.

>I suggest try to actual read what people are writing

I did and I believe those replies are following those patterns. Those comments seem unrelated to the other things about backwards compatibility. It is an entirely separate concern.

> Well my point was that it will always be an inferior experience on X11 even though it technically is possible in some circumstance.

Regardless of what you consider "inferior" (again, i do not see anything inferior assuming it is done as i described), the point was that it was possible.

> WM hints only work correctly if the window manager is compositing which many window managers are not, or do not want to add

Compositing is only needed for applications that do not support scaling themselves. There is no compositing necessary for applications that do support scaling, aside from the (literal) edge case of having an application cross two (or more) different monitors of different scale values and wanting to have the same visible area in all of them.

> and some X11 users still seem to insist on not using them...

At the end of the day it is up to users to decide what they want to do with their computers - and deal with pros and cons of their choices, the best developers can do is try to provide options.

If something isn't possible in whatever "perfect" sense one might have, it can still be worth implemented in "good enough" ways. For example i use Window Maker, a window manager without desktop compositing support (aside from a minor use for window thumbnails) the UX of which i like in general despite its flaws in some cases. If i had multiple monitors with mixed DPI, i'd rather stick with WM even if i had to deal with the "window looks too big/small while dragging it between monitors" flaw since i consider the latter a minor issue while switching to a different environment (and all the consequences it may have) a much bigger one.

> I did and I believe those replies are following those patterns. Those comments seem unrelated to the other things about backwards compatibility. It is an entirely separate concern.

Your responses indicate that your beliefs are wrong then. The comment about backwards compatibility are relevant if you are also trying to do that pattern matching against what i write there.

>At the end of the day it is up to users to decide what they want to do with their computers - and deal with pros and cons of their choices

The issue with this thinking is that those cons eventually cascade back to the developer, if you know for a fact users will use an option that is going to break the intended use case. Window Maker is going to be broken or have a sub par experience with the situation you describe, because that only works with applications that support this method. Old legacy applications with no scaling support will still need support from the window manager. So that is a perfect illustration of why that solution is inferior and can never work correctly if you want to take this angle of "I can make whatever choice I want, including the broken ones".

>Your responses indicate that your beliefs are wrong then

I do not think so, your additional writings have drifted further from that subject. I should remind you, this thread is a discussion of GNOME, not Window Maker.