View Issue Details

IDProjectCategoryView StatusLast Update
0019266LazarusLCLpublic2014-10-02 12:44
ReporterChristianAssigned ToVincent Snijders 
Status resolvedResolutionno change required 
Product Version0.9.30.1 (SVN)Product Build 
Target VersionFixed in Version 
Summary0019266: Scrolling dont work in Ubuntu 11.04
Descriptioni cannot imagine why thats possible but seems that no scrolbar works in new Ubuntu.
TagsNo tags attached.
Fixed in Revision
WidgetsetGTK 2
Attached Files


related to 0019257 closedJesus Reyes StringGrid: Row and Col properties don't affect scroll bars when set just after bulk insert 
has duplicate 0022294 closedJuha Manninen ListView - not working horizontal scrollbars 


Fabien Wang

2011-04-30 08:12

reporter   ~0047915

This is related to Unity, not Lazarus.


2011-05-01 13:48

reporter   ~0047946

Last edited: 2011-05-01 13:49

No it works also not in Gnome itself (Called Ubuntu Classic in 11.04). And every GTK2 app ill see works fine. Every LCL App dont work. So its related to Lazarus.

Reinhard Berger

2011-05-02 15:06

reporter   ~0047973

think i did read something in the release notes from 11.04,

"The new Ayatana Scrollbars are now enabled by default. Certain applications however are blacklisted, see"

maybe this is the problem ?

Ludo Brands

2011-05-02 17:31

developer   ~0047977

The overlay scroll bars are the culprit. Ubuntu is maintaining a blacklist of applications that don't work with these new, IMO ugly, scroll bars. On an almost daily basis apps are added to the blacklist. Examples:,, etc. The blacklist is apparently not a simple file that can be edited.

To disable the overlay scroll bars for all applications(from terminal):
sudo su
echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars

Log out and you are back to the old scroll bars.

Ludo Brands

2011-05-03 11:37

developer   ~0048000

Did some further testing since ubuntu claims that gtk_scrolled_window should work without modification. Overlay scroll bars work for Tform, Tmemo, TScrollBox, TListBox and TCheckListBox. They don't work for TStringGrid, TDrawGrid. Difference: grid scrolling is managed in the LCL. Similar for most IDE designer windows: scrolling is handled in the IDE and overlay scroll bars don't work.
I didn't realize it was working for TForm. Interesting, this means grids and TSynEdit would probably be fixed if converted to TScrollingWinControl :-)

Alexander Shishkin

2011-09-02 09:19

reporter   ~0051373

"As of the Ubuntu 11.04 release, most GTK applications are known to work with the feature. However, only applications using the gtk_scrolled_window type are fully compatible with the new scrollbar." (

Zeljan Rikalo

2012-02-04 14:38

developer   ~0056451

This is ubuntu unity + liboverlay problem not fixable by us. export LIBOVERLAY_SCROLLBAR=0 is solution.


2012-02-05 15:53

reporter   ~0056524

Iam not sure about this, ts no Unity Problem becouse we dont use the scrolling widgets unity can not know about that.
Flávio Etrusco has shown the correct direction for that i think.


2012-02-05 15:54

reporter   ~0056525

Its no solution that the user must change System settings to run an Lazarus Application. 99% of all GTK Applications runs correctly so Lazarus Apps should also.

Mattias Gaertner

2012-02-05 16:46

manager   ~0056527

The 99% can be explained:
Unity has replaced the gtk scrolling widget and Ubuntu has disabled this feature for a number of applications. Go to and download overlay-scrollbar_0.2.11.orig.tar.gz (374.7 KiB).
You will get an impressive list of applications:


Zeljan Rikalo

2012-02-05 16:54

developer   ~0056528

@Christian, you're wrong. New ubuntu uses liboverlay and other distros NOT, so that's root of all problems (tested under FC14 and FC16 with pure gnome). Another problem is that liboverlay have HARDCODED black(white)list of gtk2 apps as Mattias mentioned, so as soon as you get your application in that list it'll work.
IMO, this should be closed because it's impossible to fix it via gtk2lcl,on the other hand you have workaround to disable liboverlay, as already mentioned here.
Second workaround for your app could be to use libc and putenv('LIBOVERLAY_SCROLLBAR=0') in your lpr before Application.Initialize (never tried this, so don't know if it works).

Zeljan Rikalo

2012-02-05 18:35

developer   ~0056540

This is problematic part of liboverlay (os-utils.c), now I see why qt apps with gtk theme works fine with liboverlay :)
Worst solultion I've ever seen. Why they didn't extend this to read eg. /etc/liboverlay/moreblacklistedapps.conf and
$HOME/.liboverlay/moreblacklistedapps.conf .... then it's easy to fix problem
by automatically adding our lcl app to that list.

os_utils_is_blacklisted (const gchar *program)
  /* Black-list of program names retrieved with g_get_prgname(). */
  static const gchar *blacklist[] = {
    "eclipse", /* */
    "emacs", /* */
    "emacs23", /* */
    "firefox", /* */
    "firefox-bin", /* */
    "firefox-trunk", /* */
    "gimp", /* */
    "gimp-2.6", /* */
    "gimp-2.7", /* */
    "gimp-2.8", /* */
    "gnucash", /* */
    "gvim", /* */
    "soffice", /* */
    "synaptic", /* */
    "thunderbird-bin", /* */
    "vinagre", /* */
    "vmplayer", /* */
    "vmware"/* */

  GModule *module;
  gpointer func;
  gint32 i;
  const gint32 nr_programs = G_N_ELEMENTS (blacklist);

  /* Black-list of symbols. */
  module = g_module_open (NULL, 0);
  /* */
  if (g_module_symbol (module, "qt_startup_hook", &func))
      g_module_close (module);
      return TRUE;
  g_module_close (module);

  for (i = 0; i < nr_programs; i++)
    if (g_strcmp0 (blacklist[i], program) == 0)
      return TRUE;

  return FALSE;


2012-02-05 21:21

reporter   ~0056545

And what about the solution to use TScrollingWidget for the grids ?
Iam not sure how problematic this fix is but for my POV it would make sense in general.

Zeljan Rikalo

2012-02-05 21:54

developer   ~0056547

TCustomGrid is TCustomControl afair, and changing there something like that is a pretty huge task and I'm pesimistic about it.

Martin Friebe

2013-09-13 21:05

manager   ~0070030

This issue was last tested against an now outdated version of Lazarus. Please test against current trunk.

Vincent Snijders

2014-10-02 12:44

manager   ~0077907

No feedback from reporter.

Issue History

Date Modified Username Field Change
2011-04-30 08:06 Christian New Issue
2011-04-30 08:06 Christian Widgetset => GTK 2
2011-04-30 08:12 Fabien Wang Note Added: 0047915
2011-05-01 13:48 Christian Note Added: 0047946
2011-05-01 13:49 Christian Note Edited: 0047946
2011-05-01 13:49 Christian Note Edited: 0047946
2011-05-02 15:06 Reinhard Berger Note Added: 0047973
2011-05-02 17:31 Ludo Brands Note Added: 0047977
2011-05-03 11:37 Ludo Brands Note Added: 0048000
2011-05-03 11:54 Juha Manninen Relationship added related to 0019257
2011-05-18 16:36 Juha Manninen Relationship added related to 0019369
2011-09-01 19:25 Flávio Etrusco (notifications not working) Note Added: 0051363
2011-09-02 09:19 Alexander Shishkin Note Added: 0051373
2011-10-07 14:26 Vincent Snijders LazTarget => -
2011-10-07 14:26 Vincent Snijders Status new => acknowledged
2012-02-04 14:38 Zeljan Rikalo Status acknowledged => resolved
2012-02-04 14:38 Zeljan Rikalo Resolution open => not fixable
2012-02-04 14:38 Zeljan Rikalo Assigned To => Zeljan Rikalo
2012-02-04 14:38 Zeljan Rikalo Note Added: 0056451
2012-02-05 15:53 Christian Note Added: 0056524
2012-02-05 15:54 Christian Status resolved => assigned
2012-02-05 15:54 Christian Resolution not fixable => reopened
2012-02-05 15:54 Christian Note Added: 0056525
2012-02-05 16:46 Mattias Gaertner Note Added: 0056527
2012-02-05 16:48 Zeljan Rikalo Assigned To Zeljan Rikalo =>
2012-02-05 16:54 Zeljan Rikalo Note Added: 0056528
2012-02-05 16:54 Zeljan Rikalo Status assigned => feedback
2012-02-05 18:35 Zeljan Rikalo Note Added: 0056540
2012-02-05 18:36 Zeljan Rikalo Relationship deleted related to 0019369
2012-02-05 21:21 Christian Note Added: 0056545
2012-02-05 21:54 Zeljan Rikalo Note Added: 0056547
2012-06-18 20:44 Juha Manninen Relationship added has duplicate 0022294
2013-09-13 21:05 Martin Friebe Note Added: 0070030
2014-10-02 12:44 Vincent Snijders Note Added: 0077907
2014-10-02 12:44 Vincent Snijders Status feedback => resolved
2014-10-02 12:44 Vincent Snijders Resolution reopened => no change required
2014-10-02 12:44 Vincent Snijders Assigned To => Vincent Snijders