[gedit-list] Overlay scrollbars - ignoring env. variable



I've been having some trouble with getting Gedit not to use the overlay 
scrollbars. Eventually I have found a solution, but I would like to find
 out why it's behaving like this and if there's a better way to solve 
it.
 
Useful information: Gedit 3.16.3 running outside of GNOME, in an Openbox session started with LightDM on Arch 
Linux.
 
My
 first approach was to just utilize the GTK_OVERLAY_SCROLLING=0 
environment variable. Exporting it via Openbox's environment file worked
 (printenv shows it's set) and all the other GTK3 applications 
(File-Roller and QuodLibet) default to the classic scrollbars. Gedit 
however only partially switched back to them. Launching it via a 
terminal gives me the classic scrollbars. Opening a text file with Gedit
 though my file manager (Thunar) gives me the new, overlay scrollbars, 
despite the environment variable being there.

After some more 
testing, I found out that starting the Openbox session with startx 
instead of with a display manager (LightDM) "fixed" the problem. First I 
thought it was a LightDM bug, but other display managers have the same 
issue. For sessions started with a display manager, using ~/.xprofile 
instead of Openbox's environment file to export the env. variable 
worked too; no overlay scrollbars in Gedit, even for files opened via the 
file manager. However, I didn't stop here, because I'd prefer to keep all my user environment settings in 1 
file (Openbox's dedicated file for that) and because other GTK3 applications didn't have the problem.

Lastly, I have found a way[1] to disable them by using Openbox's environment file. Adding this:

gdbus
 call --session --dest org.freedesktop.DBus --object-path 
/org/freedesktop/DBus --method 
org.freedesktop.DBus.UpdateActivationEnvironment 
'{"GTK_OVERLAY_SCROLLING": "0"}

makes it work as expected and I can keep all my environment settings in 1 file, which is (so far) my 
preferred solution.

My question is: why does Gedit ignore the set environment variable when launched through a file manager and 
why does adding that gdbus call fix it? Also: who's the actual culprit for this issue? Is it the display 
manager, Openbox, my file manager or actually Gedit? If it's indeed a Gedit issue, is this a bug and how 
could I get it to behave like the other GTK3 applications?

[1] https://www.reddit.com/r/gnome/comments/37bp1r/how_do_i_disable_316s_overlay_scrollbars/
                                          


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]