Cimbali / pympress

Pympress is a simple yet powerful PDF reader designed for dual-screen presentations
https://cimbali.github.io/pympress/
GNU General Public License v2.0
1.14k stars 88 forks source link

Pympress crashes on start on Fedora 38 beta. #283

Closed cgevans closed 1 year ago

cgevans commented 1 year ago

Describe the bug

On the Fedora 38 beta, running Wayland and using GDK_BACKEND=wayland, Gdk.Display.get_primary_monitor returns None. As a result, ScreenArea.lookup_monitors fails, and pympress fails on startup.

There appear to be several fundamental limitations that prevent screen positioning from functioning properly with Wayland and Gtk (eg, window position information is not actually meaningful). However, changing this code to simply return something for the primary monitor will result in pympress working, with the limitation that some window positioning will not work.

To Reproduce Steps to reproduce the behavior:

  1. Start pympress, under the conditions noted.

Environment (please complete the following information):

Cimbali commented 1 year ago

Thanks for the report and fix. There seems to be “no concept of primary screen” on wayland which even caused gtk 4 to retire the API. I think we’ll have to parse EDID screen info in the future or something medieval like that…