mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Linux: Default to using XWayland instead of native Wayland as there are various bugs with Qt+Wayland . You can set the env var QT_QPA_PLATFORM=wayland to force calibre to use Wayland.
This commit is contained in:
parent
59541e36a5
commit
8e5666b306
@ -49,6 +49,7 @@ Environment variables
|
|||||||
the system theme -- beware of crashes and hangs.
|
the system theme -- beware of crashes and hangs.
|
||||||
* ``CALIBRE_SHOW_DEPRECATION_WARNINGS`` - causes calibre to print deprecation warnings to stdout. Useful for calibre developers.
|
* ``CALIBRE_SHOW_DEPRECATION_WARNINGS`` - causes calibre to print deprecation warnings to stdout. Useful for calibre developers.
|
||||||
* ``CALIBRE_NO_DEFAULT_PROGRAMS`` - prevent calibre from automatically registering the filetypes it is capable of handling with Windows.
|
* ``CALIBRE_NO_DEFAULT_PROGRAMS`` - prevent calibre from automatically registering the filetypes it is capable of handling with Windows.
|
||||||
|
* ``QT_QPA_PLATFORM`` - On Linux set this to ``wayland`` to force calibre to use Wayland. Note however that Qt + Wayland is extremely buggy.
|
||||||
* ``SYSFS_PATH`` - Use if sysfs is mounted somewhere other than /sys
|
* ``SYSFS_PATH`` - Use if sysfs is mounted somewhere other than /sys
|
||||||
* ``http_proxy``, ``https_proxy`` - used on Linux to specify an HTTP(S) proxy
|
* ``http_proxy``, ``https_proxy`` - used on Linux to specify an HTTP(S) proxy
|
||||||
|
|
||||||
|
@ -1059,6 +1059,16 @@ class Application(QApplication):
|
|||||||
if set_app_uid(windows_app_uid):
|
if set_app_uid(windows_app_uid):
|
||||||
self.windows_app_uid = windows_app_uid
|
self.windows_app_uid = windows_app_uid
|
||||||
self.file_event_hook = None
|
self.file_event_hook = None
|
||||||
|
if not iswindows and not ismacos and not os.environ.get('QT_QPA_PLATFORM') and not headless:
|
||||||
|
# Various issues in Wayland make it unuseable so prevent Qt from
|
||||||
|
# using Wayland unless the user asks for it explicitly.
|
||||||
|
# In KDE right clicking on the book list causes left clicks on it
|
||||||
|
# to stop working till kwin is restarted. On GNOME there are no
|
||||||
|
# native window decorations. There have been reports of left clicks
|
||||||
|
# not working in GNOME though I cannot reproduce. So force use of
|
||||||
|
# XWayland.
|
||||||
|
os.environ['QT_QPA_PLATFORM'] = 'xcb'
|
||||||
|
|
||||||
if isfrozen and QT_VERSION <= 0x050700 and 'wayland' in os.environ.get('QT_QPA_PLATFORM', ''):
|
if isfrozen and QT_VERSION <= 0x050700 and 'wayland' in os.environ.get('QT_QPA_PLATFORM', ''):
|
||||||
os.environ['QT_QPA_PLATFORM'] = 'xcb'
|
os.environ['QT_QPA_PLATFORM'] = 'xcb'
|
||||||
if override_program_name:
|
if override_program_name:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user