Most active commenters
  • AlienRobot(3)
  • rbanffy(3)

←back to thread

Ancient X11 scaling technology

(flak.tedunangst.com)
283 points todsacerdoti | 18 comments | | HN request time: 1.25s | source | bottom
1. amiga386 ◴[] No.44371936[source]
It's not "can you provide the screen DPI to a window?" people bemoan, it's "can you draw one window across two screens with differing DPIs, transparent to the application?"
replies(3): >>44373475 #>>44374976 #>>44376314 #
2. kelnos ◴[] No.44373475[source]
You can absolutely do that on X11, but you have to do it in the client, and no one cares to do it.
replies(2): >>44374620 #>>44378572 #
3. em-bee ◴[] No.44374620[source]
if you have to do it in the client, aka the application, then it's not transparent to the application
replies(3): >>44375787 #>>44376620 #>>44377419 #
4. rwmj ◴[] No.44374976[source]
I have never had a window open across two screens if I could help it. Complete non-problem.
replies(2): >>44378087 #>>44378158 #
5. p_l ◴[] No.44375787{3}[source]
It's not transparent on Wayland or Windows (no idea about mac) either if you want actually properly drawn stuff.

Well, ok, on Windows if you keep to certain standard elements of Windows API and only use standard widgets you could get close to transparency.

6. AlienRobot ◴[] No.44376314[source]
I'm struggling to imagine why would anyone ever want to do that. It's not even an edge case at this point, it's over the edge.
replies(2): >>44376655 #>>44377603 #
7. rbanffy ◴[] No.44376620{3}[source]
It'll not be transparent to an application using basic X APIs, but nothing prevents a higher level UI toolkit from implementing it properly.
8. rbanffy ◴[] No.44376655[source]
It happens. You might push a window aside so that it's partially on a second screen and still see activity on the second screen. It should be the expected behavior.
replies(1): >>44378047 #
9. yjftsjthsd-h ◴[] No.44377419{3}[source]
If we can require applications to draw their own window controls, I think we can ask them to handle their pixel densities.
replies(1): >>44379495 #
10. whitehexagon ◴[] No.44377603[source]
I have two monitors, but only one of them is 4k and a couple cm bigger, and I dont like to buy stuff unless I really need. It is good enough for me. But this case also comes up on the edge of my laptop when I have the 4k plugged in at the same time. In the days of eclipse I'd keep the code editor top half on monitor, and the console output on the laptop, worked quite nice.
replies(1): >>44377966 #
11. AlienRobot ◴[] No.44377966{3}[source]
That sounds like you just want to detach the console window, to be honest.
12. AlienRobot ◴[] No.44378047{3}[source]
I'm not saying it doesn't happen. Of course it will happen. I'm just saying it isn't something that needs to be handled perfectly, specially when handling it perfectly requires immense design changes at a fundamental level.

Why can't you just display a blurry rectangle until the mouse cursor goes to the other screen and then you switch the primary resolution from one screen to the other?

I feel like trying to be extremely clever to handle this particular problem would lead to a solution that handles far more common situations much worse for everybody...

replies(1): >>44378180 #
13. purerandomness ◴[] No.44378087[source]
If you have more than one display, and you want to be able to drag windows from one to another and want them to have a similar size after dragging, it's a hard problem.
replies(1): >>44378595 #
14. Ar-Curunir ◴[] No.44378158[source]
You have never used two monitors with different scaling (eg laptop and desk monitor), and have never moved windows between them? Ever?

If so, good for you, but there are plenty of people who do so.

Hell, in X11 it even sucks if you use the screens one at a time, eg if you turn plug your laptop into the monitor and turn off the laptop screen, and then later unplug and continue your work on the laptop, the scaling will be off on at least one device.

15. rbanffy ◴[] No.44378180{4}[source]
> Why can't you just display a blurry rectangle until the mouse cursor goes to the other screen and then you switch the primary resolution from one screen to the other?

In that case, the approach taken in macOS is nicer - it just hides the half of the window where the pointer wasn't when the window was dragged. While dragging it does a resample of the bitmap to the screen where that part is shown.

16. account42 ◴[] No.44378572[source]
No, you can't have a window with a different pixel size on one screen and another. Trying to emulate this using two windows would not achieve a smooth experience.

OTOH it is questionable if this is really all that important. Most of the time if a window spans more than one screen it's temporary because you are just moving the window from one screen to another.

17. account42 ◴[] No.44378595{3}[source]
Not really, just have the window scale for one of the screens it covers.
18. em-bee ◴[] No.44379495{4}[source]
that's a good point. window controls should be at the proper scale too.