Eclipse flickering on new line
Asked Answered
P

3

13

I'm using Ubuntu 16.04 and Eclipse Neon. Everything looks OK but when I press enter, the new line flickering. Switching to the GTK2 solved the problem but I have some other issue in GTK2 such as scroll bar coloring and button coloring in the Dark theme.

Since I don't have any problem in GTK3 and the flickering is the only problem I have, how can I fix it in GTK3?

Here you can see how it flickers in GTK3

enter image description here

EDIT

Recently I tried Eclipse Oxygen 4.7.2 on Ubuntu GNOME, but the problem still exists. It Seems it's not the Unity problem.

Perigee answered 14/12, 2016 at 16:44 Comment(6)
You should open a bug ticket inside the Eclipse bugzillaAvionics
@Avionics This bug reported before: bugs.eclipse.org/bugs/show_bug.cgi?id=492371#c17 and only switching to the GTK2 can solve this problem but as I said on my question switching to the GTK2 can cause other Issues.Perigee
It's annoying, but does it really impact your ability to function optimally?Beryllium
@LeoWilson IMHO, If it's annoying then it can create less concentration.Perigee
Try to start eclipse with option like "--disable-gpu" For eclipse it may be '-Dprism.order=j2d' (not tested). EDIT I had a similar problem with Visual Studio Code. I found the solution: github.com/Microsoft/vscode/issues/25934Dad
@Hermann77 didn't solve the problemPerigee
S
8

update 2018/DEC/09

if you experience a background flickering in the eclipse editor on each move of the mouse pointer:

you can tell Eclipe which gtk-version to use:

#Gtk3 forced:
export SWT_GTK3=1
eclipse

#Gtk2 forced:
export SWT_GTK3=0
eclipse

for Eclipse Oxygen 3 (Version: 4.7.3, March 2018, Build id: 20180308-1800):

put

export SWT_GTK3=0

inside your ~/.profile (and restart x-server)

worked for me on Ubuntu 17.10 with Plasma and xorg and xserver-xorg-video-amdgpu: 1.4.0-1

Sickener answered 30/3, 2018 at 9:34 Comment(2)
tell Eclipse which gtk-version to use: #Gtk3 forced: export SWT_GTK3=1 eclipse #Gtk2 forced: export SWT_GTK3=0 eclipseSickener
Or just run SWT_GTK3=0 eclipseUnpleasant
B
5

First check the value of GTK_IM_MODULE in your environment by executing

echo $GTK_IM_MODULE

In my case the output was “xim”. But Eclipse expect it to be “ibus”. So enter the following command in a terminal session to set it to the value.

export GTK_IM_MODULE="ibus"

use below scripts for run it:

#!/bin/bash
export SWT_GTK3=0
export UBUNTU_MENUPROXY=0
export GTK_IM_MODULE="ibus"
cd [Eclipse Directory]
./eclipse -showlocation

don't forget make it run able:

chmod +x eclipse.sh
Bertram answered 23/8, 2020 at 7:33 Comment(2)
GTK_IM_MODULE was ibus for me. Still has the problem.Perigee
Worked for me. Also some discussion here: subhadipsblog.wordpress.com/2019/01/25/…Papandreou
J
2

I had the same issue and here is what worked for me.

Create a bash script file (e.g. eclipse_gtk2.sh) containing the following commands.

#!/bin/bash
export SWT_GTK3=0
export UBUNTU_MENUPROXY=0
cd <path to eclipse directory where the excutable is found>
./eclipse -showlocation

Make eclipse_gtk2.sh executable

chmode +x eclipse_gtk2.sh

then simply run the file ./eclipse_gtk2.sh

Hope it also works for you.

Cheers

Johns answered 26/1, 2017 at 4:25 Comment(5)
Thanks, but I already mentioned on my question that with switching to the GTK2 I have some other issues. I took screenshot: i.sstatic.net/URIdZ.pngPerigee
That is because you are using the dark theme. Unfortunately the Dark theme does not look good with GTK2. Try using the classic or gtk theme instead. Although I prefer the dark theme, I chose to have a better editing performance over a dark interface.Johns
Voted up for you but I think it's time for me to moving to the non unity desktop. It seems there is no way to make it work properly on GTK3 and unity. I use Eclipse for more than 11 hours a day. to be frank I can not do that with non dark theme.Perigee
In that case you can install Eclipse Color Theme from the Market place and make the code editing area dark. Choose Classic or GTK for the GUI and then choose a different color scheme for the syntax highlight. Not perfect, but somewhere in between.Johns
Thanks, I made my own dark highlighting but in non dark theme top, bottom, scrolls, tabs, ... will be white and it cause too much distraction.Perigee

© 2022 - 2024 — McMap. All rights reserved.