Fix swt/gtk scrolling bug, ebz#463041, rhbz#1118317

This commit is contained in:
Mat Booth 2015-04-28 12:23:45 +01:00
parent 9bf8f5629c
commit a9852033a5
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,42 @@
From 1f910fb2129bc04b508cae95ff4a02f4aa339c24 Mon Sep 17 00:00:00 2001
From: Alexander Kurtakov
Date: Thu, 23 Apr 2015 08:57:32 +0300
Subject: Bug 463041 - [GTK3] dotted lines
Redraw once done scrolling to prevent overlayed stuff around inside the
canvas.
Change-Id: I8cd640232a0863e0d0e3e810f868f7750b97fabc
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
index 48e8e78..8611902 100644
--- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
+++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
@@ -11,10 +11,10 @@
package org.eclipse.swt.widgets;
+import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.cairo.Cairo;
+import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
-import org.eclipse.swt.*;
/**
* Instances of this class provide a surface for drawing
@@ -365,6 +365,13 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
}
}
if (isFocus) caret.setFocus ();
+ /*
+ * Due to overlay drawing of scrollbars current method of scrolling leaves scrollbar and notifiers for them inside the canvas
+ * after scroll. Fix is to redraw once done.
+ */
+ if (OS.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
+ redraw(false);
+ }
}
@Override

View File

@ -38,7 +38,7 @@ Epoch: 1
Summary: An open, extensible IDE
Name: %{?scl_prefix}eclipse
Version: %{eclipse_version}
Release: 4%{?dist}
Release: 5%{?dist}
License: EPL
Group: Development/Tools
URL: http://www.eclipse.org/
@ -127,6 +127,9 @@ Patch28: eclipse-direct-hamcrest-use.patch
# See https://bugs.eclipse.org/bugs/show_bug.cgi?id=463615
Patch29: eclipse-bug-463615.patch
# See https://bugs.eclipse.org/bugs/show_bug.cgi?id=463041
Patch30: eclipse-swt-scrolling.patch
BuildRequires: rsync
BuildRequires: make, gcc
BuildRequires: gtk2-devel
@ -341,6 +344,7 @@ tar --strip-components=1 -xf %{SOURCE1}
%patch26
%patch28
%patch29 -p1
%patch30 -p1
#Disable as many things as possible to make the build faster. We care only for Eclipse.
%pom_disable_module platform.sdk eclipse.platform.releng.tychoeclipsebuilder
@ -1027,6 +1031,9 @@ fi
%{_libdir}/%{pkg_name}/plugins/org.eclipse.osgi.compatibility.state_*
%changelog
* Tue Apr 28 2015 Mat Booth <mat.booth@redhat.com> - 1:4.4.2-5
- Fix swt/gtk scrolling bug, ebz#463041, rhbz#1118317
* Wed Apr 01 2015 Mat Booth <mat.booth@redhat.com> - 1:4.4.2-4
- Fix webkit/dnd crash, ebz#463615