Add a visible warning about using Virtual Desktops with Proton or GE versions of Wine.

It's better to let users know this feature isn't going to be used. I'd use 'condition' here, but it does not support dynamic updates baed on config settings like the version.

This isn't perfect - a system provided Wine might not be detected at this point. But I think it is likely to be sufficient; the actual check against the Wine exe path remains anyway.

The rather gruff 'not supported' warning remains in any case.
This commit is contained in:
Daniel Johnson 2024-01-11 04:47:23 -05:00
parent 2c4fd23ed7
commit 460904bb44

View file

@ -119,7 +119,13 @@ def _get_fsync_warning(config, _option_key):
def _get_virtual_desktop_warning(config, _option_key):
return _("Wine virtual desktop is no longer supported")
message = _("Wine virtual desktop is no longer supported")
if config.get("Desktop"):
version = str(config.get("version")).casefold()
if "-ge-" in version or "proton" in version:
message += "\n"
message += _("Virtual desktops cannot be enabled in Proton or GE Wine versions.")
return message
class wine(Runner):
@ -932,8 +938,8 @@ class wine(Runner):
if value == "auto":
value = None
if value and key in ("Desktop", "WineDesktop") and (
"wine-ge" in self.get_executable().lower()
or "proton" in self.get_executable().lower()
"wine-ge" in self.get_executable().lower()
or "proton" in self.get_executable().lower()
):
logger.warning("Wine Virtual Desktop can't be used with Wine-GE and Proton")
value = None