Announcement

Collapse
No announcement yet.

The Ongoing Work For Native Wine Wayland Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • oiaohm
    replied
    Originally posted by drastic View Post
    Let's simplify this discussion by considering only the case of initial window position.
    Just at the end of this line you have a incorrect presume straight away with Wayland. The mistake is that is not window position but window positions. Yes positions being plural meaning more than one make a big difference.

    Originally posted by drastic View Post
    I think that some capability to set initial window position should be provided, at least so that a newly launched application appears at the same position where it previously was.
    For a variety of cases it's desirable to have a method for negotiating the restoration of previously-used states for a client's windows. This helps for e.g., a compositor/client...


    Yes this falls under Merge request 18.

    Single top level window from application can be display more than once by a Wayland compositor. GPU has no problem displaying the same output buffer more than once on same or different displays.

    Output position with Wayland Window does not have to be one position. Yes it possible for Wayland compositor to be displaying a single application window as the top middle and back window at the same time with all different offsets from different anchors on the same monitor.

    Do note 18 has the compositor recording down the physical locations of windows that the application has told the compositor are important to be remembered to be restored back in the same location/s when application is restarted.

    Wayland some old limitations are gone. Yes one of old limitation that a Window must be output to a single location is not part of Wayland.

    Yes this is one of the problem I want to absolute position of X window under Wayland and the compositor can go here have 4000+ answers pick one and they are all correct. Now you want to set a the window to a absolute position ok there are 4000+ of them do you want all 4000+ stacked on top of each other.

    Relocating window under wayland is not as straight forwards as it first seams. First you want to pick the output copy of the window you wish to alter the position of then what anchor you are moving to relative to.

    Yes that wlr-layer-shell supports this multi copies of the same window being displayed at the same time. Yes when you have this it is odd seeing all the window title bars change to active window at the same time because they are all the same window just being displayed more than once.

    Leave a comment:


  • drastic
    replied
    Originally posted by oiaohm View Post
    I can see a reason why absolute position people from Windows and X11 will not be provided.

    The virtual image based Absolute Position that people know of Windows/X11/Mac OS is not required to be used to render output. Each connected monitor output has it own individual 0.0.​
    Let's simplify this discussion by considering only the case of initial window position.

    I think that some capability to set initial window position should be provided, at least so that a newly launched application appears at the same position where it previously was. Preferably, this functionality should be provided through a Wayland proxy, so that it works automatically for every application without any special additions to the application itself. In this case, the application does not need absolute positioning.

    In the same manner, a user may, in the preferences section of an "executable launcher" file, set a custom initial absolute window position for an application. The Wayland proxy can try to honor the user's request if it can, or it can ignore it if the positioning is not possible.
    Last edited by drastic; 01 November 2023, 08:43 PM.

    Leave a comment:


  • oiaohm
    replied
    Originally posted by drastic View Post
    Yes, I know.
    The point is that the Wayland protocol could be upgraded such that a Wayland compositor (SUID) can recognize a Wayland proxy (SUID) and enable a "window position" extension which might or might not include an absolute positioning extension (but I don't see why not, if the user grants that permission).
    I can see a reason why absolute position people from Windows and X11 will not be provided.

    The virtual image based Absolute Position that people know of Windows/X11/Mac OS is not required to be used to render output. Each connected monitor output has it own individual 0.0.

    Gets more interesting.
    xdg-shell is the protocol used for “regular” application windows. Despite having “shell” in the name it is not suitable for developing Shell/Desktop environment components as in plasmashell. For example it (by design) doesn’t allow windows to position themselves, which is why the Qt API for it doesn’t work on Wayland. For developing things like panels you need a different protocol that allows to do things regular application windows can’t do. The de-facto standard for this is the layer-shell pr...



    This gets you into what KDE and Sway and Wlroots are like internally. Everything is done with anchors. Each screen has 4 anchors that you window can be positioned from.

    Here is the ultra fun point. Vulkan and Opengl the things GPU makers implement don't in fact use Windows or X11 style absolute positioning but instead this anchoring system/relative positioning system.

    So the virtual absolute positioning Windows, X11 and Mac OS does is not information the GPU wants. Wayland compositor can have stored all the relative information the GPU wants then you attempt to ask them for absolute position that they have not calculated because they don't need it.

    This part explains the big no way in hell respond merge request 247 from wlroots developer.


    Remember Weasel said you had to have absolute position to do relative placement this is not true and has not been true since we started having GPU do 2d acceleration. Sorry GPU hardware relative placement of items to each other is how GPU work.

    Fun point about layers shell you can take a single window and fully display it on many different screens as you have connected. Do note a surface using the layer shell item can be anchor almost unlimited number of times.

    Welcome to world breaking. A application window can have more than valid 1 absolute position at the same time under Wayland. Yes the top left corner of window could have almost unlimited different absolute positions at the same time and this is allowed by Wayland design. Yes under layer shell extension when you can place the same window with the same sizes on every screen so giving the window multi absolute positions that are all valid at the same time.

    Those coming from Windows and X11 are only use to the consent of a Window have a single absolute position based off a fixed anchor the reality Wayland is not that. Wayland using relative position information is about making application developer life way simpler than dealing with the absolute position system Wayland protocol itself supports. Dealing with mutli absolute positions for Windows what are allowed in Wayland in general application code would result in insanely complex programs this is why application instead are giving relative positioning as this can have forms of single values for applications to deal with.

    Wayland Compositor can be kind of smart here a Window is fully displayed on 4 screens and application sends a popup the Wayland compositor can decide to display the popup above the window output closest to the mouse.

    Leave a comment:


  • drastic
    replied
    Originally posted by oiaohm View Post
    In reality no wayland -proxy with current wayland protocol still does not end up with absolute positioning. But that does not mean you cannot do relative positioning or not get relative positioning data. Wayland wine used what the Wayland protocol offers currently.
    Yes, I know.
    The point is that the Wayland protocol could be upgraded such that a Wayland compositor (SUID) can recognize a Wayland proxy (SUID) and enable a "window position" extension which might or might not include an absolute positioning extension (but I don't see why not, if the user grants that permission).

    After the user's permission has been granted, even if there are some unwanted problems of absolute positioning, it doesn't matter; if the user wants it and has granted the permission, that's it.

    If the user wants to delete all files on his drive and has given the permission, the OS must allow that, as with any other user command or preference.
    Last edited by drastic; 01 November 2023, 04:00 PM.

    Leave a comment:


  • oiaohm
    replied
    Originally posted by drastic View Post
    Nah, usually it's not that.

    More likely, this wayland-proxy thing that oiaohm is talking about is too laboring to implement. So, they are making excuses in order to avoid a hard job.

    With that Wayland-proxy, you would effectively get absolute positioning, no matter how it is called.
    In reality no wayland -proxy with current wayland protocol still does not end up with absolute positioning. But that does not mean you cannot do relative positioning or not get relative positioning data. Wayland wine used what the Wayland protocol offers currently.

    Like it or not by the current wayland protocol design only the most direct to user Wayland compositor has absolute position. There is very big reason todo this.

    Lets say you have a window rendered on screen user grabs hold of the window with mouse and moves it. Wayland model as this window is moved around and so on the application does not need to be told it moving because the application only has relative positions..



    drastic read merge 249 this is relative.

    Wayland proxy compositor can do something like 249 using xdg_positioner, between the windows it is controlling. But this is relative you have picked A and B window and said A top left Conner is 0.0 now please place this B window at like x and Y offset relative to A. Of course you are not promised that the host Wayland compositor of a Wayland proxy exactly places the window where Wayland compositor asked it may have altered that X and Y because it was going to put window off side of screen that the notes with the positioner said not to put off side of screen yes the location of A in the A/B walk through is taken into account if B requested position is being altered by the compositor.

    By the wayland design only thing that knows exactly where something is on screen in absolute terms is the Wayland compositor connected to the outputs. Direct to hardware Wayland compositor also doing the calculation to get absolute position as late as possible and is allowed to correct the position.

    Relative positioning model of Wayland is different.

    Big thing about a Relative position model like wayland has is that you don't use just X and Y instead you are using X Y and anchor item. Yes if the anchor item moves between the time application send window to be display and the time the window is displayed under the wayland relative system the appearance of the window to the user stay in the same relative position. Under Absolute position solutions like X11 and Windows this is a race condition were the objective was to display window relative to another window but due to the target windows absolute position moving and the application also using absolute position the result is the relative position was not maintained.

    In fact absolute position system is what leads to a pop targeted to appear in the center of a window end up appearing on top of another application window where the program never intended for it to be..

    Think about it absolute positioning as a program you have not provided anchor valve instead you are using a preset anchor value. This is something wine wayland is having todo heuristics for with Windows applications that this window should be anchored to this other window.

    Wayland protocol design wants to be given more information than X11 or Windows asks for so incorrect placement is prevented where possible.

    Yes this means automation scripts to work correctly under Wayland proxy compositor people like weasel would have to get use to doing stuff in relative term instead of absolute. Yes the provide X, Y offsets and anchor mindset(relative position) instead of the old just provide X and Y with no care about anchor because that absolute and is set outside my control mind set(absolute position).
    Last edited by oiaohm; 31 October 2023, 09:11 PM.

    Leave a comment:


  • drastic
    replied
    Originally posted by Weasel View Post
    Yes, I'm not saying it should be the default. But they block it completely, ignore/reject it, even as an opt-in option, or with proper permissions defined by users.

    They think users are casual mobile morons who don't even know how to move a mouse, and they're "oh so superior" in their knowledge of how to design something and how "they know best what's good for them". Just like GNOME.
    Nah, usually it's not that.

    More likely, this wayland-proxy thing that oiaohm is talking about is too laboring to implement. So, they are making excuses in order to avoid a hard job.

    With that Wayland-proxy, you would effectively get absolute positioning, no matter how it is called.

    Leave a comment:


  • oiaohm
    replied
    Originally posted by Weasel View Post
    There's no good alternative because AutoHotkey is the best. That's the point. And Windows enables it..
    At this point Weasel as lost argument. Claiming no good alternative does not mean anything.
    Nothing you have said makes AutoHotkey the best.

    Moving a window relative to another window means absolute positioning for YOUR SCRIPT because it's not relative to your script's window. In other words, it needs to know the absolute position of the target window so that it moves the other window relative to it.​ The script needs to know that window's absolute position to do this math.
    Is this statement true. No it not Weasel. Simple thing as wine virtual desktop proves that are garbage logical positioning is not a new thing...

    All this really need is a common anchor point. Exactly why cannot the target window be the anchor and offset to other windows provide in that math format.

    Weasel look at how Wayland popup work with xdg_positioner​


    Or take a good read of 249.

    Question Weasel why is the script doing the maths using absolute position values in the first place. Remember between the time the script does the maths to work out where it should place window the absolute position data of the window can be out of date.

    Relative position moves the final maths to the compositor. From top left conner of Z window place my Windows X/Y offset. This is how xdg_positioner is doing it for popup windows.

    This is the problem Weasel absolute position information on an application windows be it X11 or Windows is always out of date. You have a race condition problem.

    Doing relative position by having the compositor/output side process it means you avoid these screw ups.

    Weasel think about what will know if a window has been moved.
    Windows lacks relative positioning in any decent way.

    What has the most current information of windows positioning?

    Weasel answer the above question truthfully. Script using absolute position information does not have most current information of window positioning.

    In Wayland the item is always the Wayland compositor with the most current information right.

    There is a problem of course Weasel does not want to admit autohotkey has a flaw caused by OS it been operating on missing a feature.

    The best pig ear is still a pigs ear Weasel. Best broken bit of software is still a broken bit of software.
    Last edited by oiaohm; 31 October 2023, 03:24 PM.

    Leave a comment:


  • Weasel
    replied
    Originally posted by oiaohm View Post
    https://www.autohotkey.com/boards/viewtopic.php?t=45289
    Weasel sorry I know AutoHotkey. I know AutoHotkey users complain about. Notice here person asking for relative position support.​ Why are they asking for this. Simple the automate an application they forgot its automated move window and all hell breaks less.

    Weasel automation is important feature but users of automation don't want the automation to be landmine. They use autohotkey because they don't have good alternative
    There's no good alternative because AutoHotkey is the best. That's the point. And Windows enables it.

    I don't think you understand what relative means. Moving a window relative to another window means absolute positioning for YOUR SCRIPT because it's not relative to your script's window. In other words, it needs to know the absolute position of the target window so that it moves the other window relative to it. The script needs to know that window's absolute position to do this math.

    Your "relative" positioning would only allow moving windows relative to the script's own windows (yes you can create GUI with AutoHotkey), which is besides the point. It's useful, but nowhere near what I was talking about.

    Leave a comment:


  • Weasel
    replied
    Originally posted by drastic View Post

    Yes, I don't want to prevent that.

    The problem is that there is quite a significant difference between granting window positioning privilege to certain applications, and granting it to all applications.

    Once the positioning privilege has been granted to all applications, there is no going back, due to compatibility concerns. That's the problem with security regarding absolute positioning.

    However, if relative positioning is the default for applications, then absolute positioning can be implemeted at a later time, or granted at a later time.
    Yes, I'm not saying it should be the default. But they block it completely, ignore/reject it, even as an opt-in option, or with proper permissions defined by users.

    They think users are casual mobile morons who don't even know how to move a mouse, and they're "oh so superior" in their knowledge of how to design something and how "they know best what's good for them". Just like GNOME.

    Leave a comment:


  • oiaohm
    replied
    Originally posted by Weasel View Post
    You also underestimate how popular AutoHotkey is on Windows. Don't be fooled by its name, it's not just about hotkeys, it's a power user scripting language. You can have zero hotkey scripts that can do all sorts of things, and of course, move windows or query their positions or scan their pixels or whatever (super important for automation).

    Weasel sorry I know AutoHotkey. I know AutoHotkey users complain about. Notice here person asking for relative position support.​ Why are they asking for this. Simple the automate an application they forgot its automated move window and all hell breaks less.

    Weasel automation is important feature but users of automation don't want the automation to be landmine. They use autohotkey because they don't have good alternative

    Yes that scan of pixels results in having todo a hack normally of forcing a window to a particular location on screen even if that happens be on top of where the user happens to be doing something else. Remember as a proxy wayland compositor you don't need to find where on the screen a window is application gave you it window and as long is not encrypted you can read it contents. Screen scraping without having todo lots of maths or risk race condition.

    Weasel the autohotkey way of doing automation is filled with race condition problems. We need to go back to the drawing board. Something remember wayland proxy compositor is possible to implement on X11 as well. Man in middle automation does not have the race condition problems.

    drastic notice how Weasel here is making his sales pitch with a busted application. This is the problem that happened over and over again with Wayland protocol discussion.

    Leave a comment:

Working...
X