Same. Thank heavens the website doesn't know the position of the browser's window in respect to the screen it's on.

There's several web APIs for browser window positioning, like screenX/Y[0] (which is what OP uses), which allows for those classic pop-up based browser games from over a decade ago, like Browser Ball.[1]

[0]: demo: https://mdn.github.io/dom-examples/screenleft-screentop/

[1]: https://romanbaiocco.github.io/browser-ball-reloaded/

For this to work, the browser itself would have to know where its window is placed on the screen. Not all platforms provide such information.

While providing this information to websites without user permission is probably a longstanding mistake of web browsers, windowing systems withholding proper on-screen positioning from native applications is a bug in that system - a bad one.

Why? The window and its position shouldn't matter to the app.

My tiling window manager doesn't care what your snowflake app thinks it wants, and I don't either.

Then continue to enjoy your broken popup menus and combo box drop downs, for starters.

Are these broken popup menus and combo box dropdowns with us in the room right now?

Yes, some things in some complex applications can break, but there are solutions and, practically, these particular things you listed simply aren't among those that break.

GNOME Files (nautilus) made the file property dialog a modal because they really want it to be centered relative to the file browser window and wayland didn't let them position or obtain coordinates.

The result is that you can't open open two file property dialogs at once (to compare sizes or dates or any other meta data, it's a common thing one might want to do).

Hopefully you'd agree that Wayland should allow apps to position windows relative to their own windows, at the very least.

With Dolphin file manager on Wayland this works for me as expected, a new window opens in the centre of the file browser window, no matter the size or position of the window. I didn't do any actual testing but I wonder what the difference is.

Making the pop-ups model has nothing to do with windows not knowing their position on screen.

It's a design choice.

For example, the VS Code menu bar is broken because the drop-downs clip against the window frame, not the screen edges. The reason is different in this case, though (electron).

All apps I use are well behaved and work to the relationship that the window they are given.

I'm trying to think of any that try to fight the interface quite as much as this.

It's not "my broken popup menus" since I'm not writing your app. This is some of the most basic portable software 101 I can't believe a real developer would complain about it.

If you do have that attitude there are a million other OOP style things to throw out for speed and correctness before virtual monitors and coordinating compositors

The its only fair that complex applications don't care about how well they work under your snowflake WM either.

Complex applications work fine.

You are literally replying to a thread that has an example of a game where the position of the window matters.

It was a cute stunt, and it's fine for it to stop working so that sites stop misbehaving.

Actually, they do, sort of. At least, if you use GLSL shaders. I remember some demo project using it in a way that made it appear that the website "sees" another window with the same website, which blew my mind when I saw it first. Cannot recall the name or anything else to locate it.

My guess is that you’re remembering this demo: https://xcancel.com/_nonfigurativ_/status/172732259457002734...

Yep, that's right.

The ability from this demo is Chromium-specific, needs extra permissions and has nothing to do with GLSL: https://developer.mozilla.org/en-US/docs/Web/API/Window_Mana...

Wait until they realize that on mobile they can use accelerometer data to keep the element in the same position in space across translations of the device.

Wait, I have to hold my phone how in order to see the div? ಠ_ಠ

I assume you have to be facing the server...

This might actually be useful as some people do their maintenance facing either Jerusalem or Mecca.

I mean, this could have applications, if you need to be facing a certain direction to read the content.

While the Silicon Valley is merely a figurative Mecca for all things tech, Apple could require people to be facing Cupertino if you want to watch a WWDC stream :D

Aww, looks like the magnetometer web API was abandoned: https://developer.mozilla.org/en-US/docs/Web/API/Magnetomete...

It's easy, you just need to hold your phone such that your eyes are pointed directly at the ads as they scroll up and down the screen. Thank you for consuming content.

The same way Steve Jobs said to hold the iPhone.

I've actually kind of wanted something like that.

Sometimes there is no size setting that will get the text lines on a page to fit horizontally without making the text too small to read. Making it large enough to read means lots of left and right scrolling which is annoying.

A mode where moving the phone sideways scrolls the text at a matching rate so that the experience is similar to reading a page with a magnifying glass might be handy.

Most people would rather lines to be broken up and wrapped around than to have to walk around the room to read. Do you often find yourself reading photographs of stone tables or something?

Why would you have to walk? You would be moving the phone back and forth by less than the width of a page.

Wrapping is fine on some material, but when there are tables it can be very annoying.

Translations? Not far enough, got to include rotations: https://developer.mozilla.org/en-US/docs/Web/API/Device_orie...

(And yes, CSS can rotate around all three axes, so you could make a div that resists rotating your device in addition to resisting translation...)

So the content falls down at 10 m/s^2 unless you're falling alongside it.

And running to counter earth rotation...

But the problem is, you can never quite catch up to it without a rocket.

No, you can also take your clothes off and throw them upward with sufficient force.

I think that I saw somebody take your advice about five hours ago at the beach.

Stop giving them ideas! :(

position: hyperfixed;