WineHQ
Bug Tracking Database – Bug 42284

 Bugzilla

 

Last modified: 2018-01-12 00:55:28 CST  

Enable using Wine with Wayland and without X on Linux

Bug 42284 - Enable using Wine with Wayland and without X on Linux
Enable using Wine with Wayland and without X on Linux
Status: UNCONFIRMED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: -unknown
2.0-rc6
x86-64 Linux
: P2 enhancement
: ---
Assigned To: Mr. Bugs
: integration
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2017-01-22 21:28 CST by Shmerl
Modified: 2018-01-12 00:55 CST (History)
19 users (show)

See Also:
Regression SHA1:
Fixed by SHA1:
Distribution: ---
Staged patchset:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shmerl 2017-01-22 21:28:15 CST
Currently, Wine on Linux is strongly dependent on X, and when used with the desktop environment with new Wayland display server, Wine is forced to run through XWayland, which so far remains a poor experience.

The whole Linux desktop is now strongly pushing the switch from X to Wayland, and many major applications are now in the process of enabling this switch.

Is there some plan for such effort in Wine? Is it even feasible? I couldn't find any bugs opened for it, so I'm opening one here to track this.
Comment 1 Michael Müller 2017-01-23 12:33:15 CST
It is very unlikely that Wine is going to support Wayland in the same way as X. I worked on a Wayland driver for Wine some time ago, but discontinued the idea because Wayland lacks many features that are expected by Windows programs.

One problem is for example that a program can not specify the location of a newly created window. This doesn't sound very problematic at first, until you notice that drop-down / popup menus are also just normal windows on Windows. The solution that Wayland provides for this is not really compatible with the Win32 API. I therefore talked with some Wayland developers and there is no chance of fixing this in the future. It is part of their concept that applications should not have control over the window position and similar settings.

IMHO, it is not a good solution to remove features just because an application could abuse them. I can understand this for security relevant features, like grabbing the keyboard and mouse input from another window, but not for things like specifying the window position. It is like removing the possibility to delete files, because the user could accidentally click on the wrong file, instead of implementing a recycle bin. Adding a way to recover from situations in which programs misbehave would be a better solution, but this is just my opinion.

The opinion from the Wayland developers is that you should stick to XWayland. The best solution Wine could offer, would be a virtual desktop that uses native Wayland. Not sure if it is worth the effort though.
Comment 2 Shmerl 2017-01-23 13:17:19 CST
(In reply to Michael Müller from comment #1)
> The opinion from the Wayland developers is that you should stick to
> XWayland. The best solution Wine could offer, would be a virtual desktop
> that uses native Wayland. Not sure if it is worth the effort though.

Yeah, sticking to X doesn't sound like a good long term solution.

By making a virtual desktop, do you mean implementing a full blown Wayland compositor in Wine? I also thought that this is one of the options.
Comment 3 Michael Müller 2017-01-23 14:27:58 CST
(In reply to Shmerl from comment #2)
> By making a virtual desktop, do you mean implementing a full blown Wayland
> compositor in Wine? I also thought that this is one of the options.

No, I mean what you get when you enable the virtual desktop in the graphic tab in winecfg.
Comment 4 Joshua Hoblitt 2017-01-23 16:46:26 CST
Would it be possible map calls into GTK, QT, or equivalent toolkit that know how to draw directly on a wayland buffer?

Xwayland has worked for everything I've tried under it except screen capture applications that need low level X voodoo.  I think the major reason for wine to want to move to native wayland support would be for performance reasons.  I haven't seen any benchmarks that compare native wayland, vs Xwayland, vs Xorg on the same hardware so I don't know which way the winds are currently blowing.  I would expect wayland [at least eventually] to come out ahead.
Comment 5 Constantine 2017-03-02 08:05:50 CST
> Would it be possible map calls into GTK, QT, or equivalent toolkit that know
> how to draw directly on a wayland buffer?

FTR wine-staging has "enable gtk3" tab, so it's probably already started.
Comment 6 Vincent Povirk 2017-03-02 10:58:46 CST
> Would it be possible map calls into GTK, QT, or equivalent toolkit that know
> how to draw directly on a wayland buffer?

This would not solve the problem Michael described. These toolkits are able to correctly position drop-down menus because they know which main window the menu belongs to, and can request positioning relative to that. Wine does not generally have this information and would have to guess.

I don't think the problem is insurmountable, but then again I didn't do the work.
Comment 7 Brane2 2017-10-15 15:04:10 CDT
Wouldn't then optimal solution be to solve it in wayland compositor ?

I suppose folks would have to agree on some sort of standard interface to wine that could be implemented on all compositors...
Comment 8 Jürg Billeter 2018-01-12 00:55:28 CST
Wayland clients have control over the position and size of sub-surfaces. Would it be feasible to use sub-surfaces for drop-down/popup menus?


Hosted By CodeWeavers