Skip to content

Commit

Permalink
Do not use GDK Wayland module
Browse files Browse the repository at this point in the history
pqiv has some rendering issues with this module, the same it had 8 years
ago when I first experimented with it. Since the x11 backend still works
just fine with Wayland, I see no need to fix this right now.

The issues are quite visible when running with GDK_BACKEND=wayland. See
also the TODO at the end of the draw callback.
  • Loading branch information
phillipberndt committed Feb 16, 2024
1 parent d60a3f1 commit 3390155
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ Changelog
pqiv 2.13 (dev)
* Fix `toggle_fullscreen(1/2)` behavior when already fullscreen
* Add `--font` to adjust info box font, use Pango for rendering (See #221)
* Prefer x11 over wayland GDK backend to avoid rendering issues

pqiv 2.12
* Fix external image filters (Fixes #182)
Expand Down
6 changes: 6 additions & 0 deletions pqiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -8178,6 +8178,12 @@ int main(int argc, char *argv[]) {
#endif
#endif

#if GTK_CHECK_VERSION(3, 10, 0)
// Always prefer x11 over Wayland. Wayland rendering has several issues, in particular
// windows have an undesired black margin around them.
gdk_set_allowed_backends("x11,*");
#endif

#if defined(GDK_WINDOWING_X11)
XInitThreads();
#endif
Expand Down

0 comments on commit 3390155

Please sign in to comment.