* d/p/0001-Fix-division-by-zero-when-calculating-the-refresh-ra.patch:

+ New patch. Fix division by zero when running under Xvfb.
This commit is contained in:
Emilio Pozuelo Monfort
2016-07-20 20:29:15 +00:00
parent 6e5520bbff
commit 14653f8f44
3 changed files with 29 additions and 0 deletions

2
debian/changelog vendored
View File

@ -7,6 +7,8 @@ gtk+3.0 (3.21.4-1) UNRELEASED; urgency=medium
for wayland-protocols and glib.
* debian/patches/wayland-add-extended-state-for-tiled.patch:
+ Dropped, included upstream.
* d/p/0001-Fix-division-by-zero-when-calculating-the-refresh-ra.patch:
+ New patch. Fix division by zero when running under Xvfb.
-- Emilio Pozuelo Monfort <pochu@debian.org> Mon, 18 Jul 2016 19:11:22 +0200

View File

@ -0,0 +1,26 @@
From 791a6a1835485a621d54f59f33f7bb9d56874200 Mon Sep 17 00:00:00 2001
From: Emilio Pozuelo Monfort <pochu27@gmail.com>
Date: Wed, 20 Jul 2016 17:09:15 +0200
Subject: [PATCH] Fix division by zero when calculating the refresh rate
---
gdk/x11/gdkscreen-x11.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 34dfccc..1916bb6 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -474,7 +474,8 @@ init_randr15 (GdkScreen *screen, gboolean *changed)
XRRModeInfo *xmode = &resources->modes[j];
if (xmode->id == crtc->mode)
{
- refresh_rate = (1000 * xmode->dotClock) / (xmode->hTotal *xmode->vTotal);
+ if (xmode->hTotal && xmode->vTotal)
+ refresh_rate = (1000 * xmode->dotClock) / (xmode->hTotal *xmode->vTotal);
break;
}
}
--
2.8.1

View File

@ -8,3 +8,4 @@
no-accessibility-dump.patch
reftest-known-fail.patch
Don-t-apply-GDK_HINT_RESIZE_INC-to-GDK_WINDOW_STATE_.patch
0001-Fix-division-by-zero-when-calculating-the-refresh-ra.patch