Improve the workaround for native GdkWindows

Overshooting caused the image to be one pixel taller/wider,
due to using ceil() within get_display_dimensions().
This commit is contained in:
Přemysl Eric Janouch 2022-07-17 11:42:42 +02:00
parent 47b7600f5e
commit 9a0647fdfd
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 1 additions and 1 deletions

View File

@ -651,7 +651,7 @@ set_scale(FivView *self, double scale, const GdkEvent *event)
// when using a native X11 Window. This is a silly workaround.
GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(self));
if (window && gdk_window_has_native(window) && scale == 1)
scale = 1.000000000000001;
scale = 0.999999999999999;
if (self->scale == scale)
goto out;