fix X11 hangs with patches from upstream bug 16497

This commit is contained in:
Tom Callaway 2015-10-23 11:12:22 -04:00
parent 033bdfd865
commit c45c586b4e
3 changed files with 63 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From bf674ad00579d76d5ade415ee08c62fa4a652f96 Mon Sep 17 00:00:00 2001
From: Siteshwar Vashisht <svashisht@redhat.com>
Date: Thu, 17 Sep 2015 10:13:24 -0400
Subject: [PATCH] Disable backing store in X11 window
Xorg server will not generate Expose events if backing store is enabled. Since implementation of this X11 module relies on Expose events, we should explicitly disable backing store in X11 window.
---
src/modules/X11/devX11.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/modules/X11/devX11.c b/src/modules/X11/devX11.c
index b714f1a..143441f 100644
--- a/src/modules/X11/devX11.c
+++ b/src/modules/X11/devX11.c
@@ -1477,7 +1477,7 @@ X11_Open(pDevDesc dd, pX11Desc xd, const char *dsp,
memset(&attributes, 0, sizeof(attributes));
attributes.background_pixel = whitepixel;
attributes.border_pixel = blackpixel;
- attributes.backing_store = Always;
+ attributes.backing_store = NotUseful;
attributes.event_mask = ButtonPressMask
| ButtonMotionMask
| PointerMotionHintMask
--
1.7.1

View File

@ -0,0 +1,29 @@
From 1d2f8f70375b5d34ec7485833e20f5b78ed135ed Mon Sep 17 00:00:00 2001
From: Siteshwar Vashisht <svashisht@redhat.com>
Date: Thu, 17 Sep 2015 08:55:55 -0400
Subject: [PATCH] Wait for MapNotify event while intializing window
---
src/modules/X11/devX11.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/X11/devX11.c b/src/modules/X11/devX11.c
index c2eab80..b714f1a 100644
--- a/src/modules/X11/devX11.c
+++ b/src/modules/X11/devX11.c
@@ -1698,10 +1698,10 @@ X11_Open(pDevDesc dd, pX11Desc xd, const char *dsp,
XMapWindow(display, xd->window);
XSync(display, 0);
- /* Gobble expose events */
+ /* Gobble MapNotify events */
while ( XPeekEvent(display, &event),
- !XCheckTypedEvent(display, Expose, &event))
+ !XCheckTypedEvent(display, MapNotify, &event))
;
/* XNextEvent(display, &event);
if (event.xany.type == Expose) {
--
1.7.1

9
R.spec
View File

@ -51,12 +51,14 @@
Name: R
Version: 3.2.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A language for data analysis and graphics
URL: http://www.r-project.org
Source0: ftp://cran.r-project.org/pub/R/src/base/R-3/R-%{version}.tar.gz
Source1: macros.R
Source2: R-make-search-index.sh
Patch0: 0001-Disable-backing-store-in-X11-window.patch
Patch1: 0001-Wait-for-MapNotify-event-while-intializing-window.patch
License: GPLv2+
Group: Applications/Engineering
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -325,6 +327,8 @@ from the R project. This package provides the static libRmath library.
%prep
%setup -q
%patch0 -p1 -b .disable-backing-store
%patch1 -p1 -b .wait-for-map-notify
# Filter false positive provides.
cat <<EOF > %{name}-prov
@ -957,6 +961,9 @@ R CMD javareconf \
%postun -n libRmath -p /sbin/ldconfig
%changelog
* Fri Oct 13 2015 Tom Callaway <spot@fedoraproject.org> - 3.2.2-2
- apply patches from upstream bug 16497 to fix X11 hangs
* Fri Aug 14 2015 Tom Callaway <spot@fedoraproject.org> - 3.2.2-1
- update to 3.2.2