Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 542516

Summary: Horizontal scrolling in editors is broken when SWT_GTK3=0
Product: [Eclipse Project] Platform Reporter: Andrey ''Bass'' Shcheglov <andrewbass>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: antonkrug, Lars.Vogel
Version: 4.8   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Eclipse 4.9, GTK2
none
Eclipse 4.9, GTK3 none

Description Andrey ''Bass'' Shcheglov CLA 2018-12-07 08:01:54 EST
Starting with Eclipse 4.8, horizontal scrolling is broken in text editors when using GTK2 as a back-end (with SWT_GTK3=0). Vertical scrolling, on the other hand, is OK.

Steps to reproduce:

1. Download Eclipse platform (eclipse-platform-4.8-linux-gtk-x86_64.tar.gz or eclipse-platform-4.9-linux-gtk-x86_64.tar.gz).
2. Set SWT_GTK3 to 0 (`export SWT_GTK3=0`).
3. Start eclipse with a fresh workspace.
4. Open an arbitrary non-empty text file.
5. Scroll the file horizontally.
6. The editor area will be all messed up.

$ uname -a
Linux unit-725 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux
$ java -version
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

Eclipse version strings:

Photon (4.8)
Build id: I20180611-0500

and 

Version: 2018-09 (4.9)
Build id: I20180906-0745

When running Eclipse with GTK3 back-end (SWT_GTK3=1), there's no visual artifacts in the editor area. Screenshots (for both GTK2 and GTK3) are attached.
Comment 1 Andrey ''Bass'' Shcheglov CLA 2018-12-07 08:04:26 EST
Created attachment 276858 [details]
Eclipse 4.9, GTK2
Comment 2 Andrey ''Bass'' Shcheglov CLA 2018-12-07 08:06:01 EST
Created attachment 276859 [details]
Eclipse 4.9, GTK3
Comment 3 Lars Vogel CLA 2018-12-07 08:15:16 EST
GTK2 support has been removed in latest development branch. Please move to GTK3.
Comment 4 Andrey ''Bass'' Shcheglov CLA 2018-12-07 08:22:41 EST
Thanks.

This is probably a duplicate of #530693.

*** This bug has been marked as a duplicate of bug 530693 ***
Comment 5 Anton Krug CLA 2018-12-07 19:24:42 EST
If I understand it correctly the GTK3 support improved significantly. If you forced the GTK2 due to some previous Eclipse GTK3 bug, then check it again, as all known GTK3 problems been solved already.
Comment 6 Andrey ''Bass'' Shcheglov CLA 2018-12-10 02:54:03 EST
@Anton Krug: thank you, I have tried GTK3 recently. At least, there's a problem with screen real estate being wasted: bug #542527.