News for hackers. Stuff that matters.
Re:The top layer: a solution to z-index:10000 by notriddle on Thursday August 25, 2022 @03:34PM (#32598858)
1. This is straight up <https://devblogs.microsoft.com/oldnewthing/20110310-00/?p=11...> and <https://devblogs.microsoft.com/oldnewthing/20050607-00/?p=35...>. Since the Chrome team probably have at least one team member who reads that blog, they'll probably do the same thing and make this the "the buck stops here" rule for anything that doesn't have special privileges, like the browser itself or extensions.

2. There should be a webext-exclusive API for placing items above the top layer.

Re:The top layer: a solution to z-index:10000 by kccqzy on Thursday August 25, 2022 @11:56PM (#32603181)
They could have defined `z-index: omega` to be on top of all other natural number z-indices. And they we can have `z-index: omega+1`, `z-index: omega+2`, ..., `z-index: omega*2`, `z-index: omega*2+1`, ..., `z-index: omega*3`, ..., `z-index: omega*omega`, ..., and so on and so forth.

And then maybe next year they will propose a new syntax for setting z-index to epsilon zero.

Re:The top layer: a solution to z-index:10000 by immibis on Thursday August 25, 2022 @06:38PM (#32600858)
I suggest using this archive: http://bytepointer.com/resources/old_new_thing/20050607_141_... because devblogs.microsoft.com has repeatedly deleted all the comments and broken links and will do so again.
Re:The top layer: a solution to z-index:10000 by dataflow on Thursday August 25, 2022 @05:44PM (#32600311)
The problem with those blog posts is that they apply just as equally well to the existing "topmost" flag as they do to the hypothetical "super topmost" flags. The answer to "what if two programs have the topmost flag set?" wasn't "you violate the laws of metaphysics", it was "well then they order relative to each other the usual way". The same thing would presumably apply for even higher-level topmost flags; it's just a hierarchical ordering mechanism, which is in no way logically inconsistent as Raymond makes them appear.

Moreover, Windows literally added support for the "even more topmost" feature later - they're called "bands", and supported by CreateWindowInBand(), except IIRC Microsoft later restricted support for that function to its own signed binaries, presumably to prevent vendors from abusing it. Needless to say, the addition of that function didn't violate the accepted rules of metaphysics.

Re:The top layer: a solution to z-index:10000 by Aeolun on Thursday August 25, 2022 @08:50PM (#32601990)
It sems you are agreeing with Raymond, but make it sound like you don’t?
Re:The top layer: a solution to z-index:10000 by dataflow on Thursday August 25, 2022 @09:00PM (#32602078)
I'm pretty sure I'm disagreeing? He's claiming having a "super-topmost" feature would somehow defy logic, whereas I'm saying it's perfectly fine—you can (and later Microsoft literally did) implement a "super-topmost" flag perfectly fine, and it would literally mean "this is on top of all topmost windows", just as the customer had requested. Of course logically it couldn't always be on top of other super-topmost windows, but that's not what the customer asked for either.
Re:The top layer: a solution to z-index:10000 by chii on Friday August 26, 2022 @03:12AM (#32604165)
> just as the customer had requested.

but that's what those blogposts were about! The customer wanted their window to be on top of every other window - even if the other window is asking to be on top of every other window!

If you have a secret "super-duper-topmost" window flag, then you're not really satisfying the customer's request. but if you do indeed have this super-duper-topmost window flag, what happens if two windows tried to ask for the same? How do you decide which goes ultimately on top?

Re:The top layer: a solution to z-index:10000 by Aeolun on Friday August 26, 2022 @09:05AM (#32606935)
He’s arguing that there is no point to having another level of topmost if all applications currently using topmost are all going to use that new super topmost level anyway. If they’re currently using topmost, you can practically guarantee that will be the case.

If what you say is true, the only way they prevented that is by not making the new super topmost accessible to users, which isn’t really fulfilling the users request.

Re:The top layer: a solution to z-index:10000 by jasonjayr on Thursday August 25, 2022 @04:13PM (#32599387)
From the oldnewthing blog:

> And it’ll try something nastier, like enumerating all the processes on the system, attaching to each one with debug privilege, and suspending all the threads.

This is like playing corewars with Windows desktop software :)

> “Note to self: Do not get into a walls-and-ladders contest with Raymond.”

Don't play with the person who knows all the lower levels :)

Re:The top layer: a solution to z-index:10000 by goto11 on Friday August 26, 2022 @12:21PM (#32609405)
Fun, but entirely missing the point. You can't force a window to cover a window from an independent program, since you have no authority over that other program. But obviously you can design a popup to cover other windows in the same program. The scope of this "top layer" is the web page - it does not enable you to force-close other tabs containing your competitors web site.

Popups have existed on the web for ages. This just proves a more convenient syntax without having to inject dom elements at the end of the body element (which is how popups are traditionally done).

Re:The top layer: a solution to z-index:10000 by wruza on Thursday August 25, 2022 @09:07PM (#32602123)
I’d run other software in a maximized vm window and hide it entirely when required. Try escape that. More abstractly, when parties cannot negotiate, you should set up a supervisor for them. On linux/x11 it would be a custom wm script which knows the priority of window classes and stacks them accordingly, regardless of their requests. Windows wm delegates geometry to apps and by that creates the whole issue.

There should be a webext-exclusive API for placing items above the top layer.

Together with a priority in extension settings.

Re:The top layer: a solution to z-index:10000 by fomine3 on Thursday August 25, 2022 @09:54PM (#32602466)
Still even Microsoft plays such army race game.. https://github.com/tablacus/TablacusExplorer/issues/140#issu...