View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0019266LazarusLCLpublic2011-04-30 08:062013-09-13 21:05
ReporterChristian 
Assigned To 
PrioritynormalSeverityblockReproducibilityalways
StatusfeedbackResolutionreopened 
PlatformOSOS Version
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
LazTarget-
WidgetsetGTK 2
Attached Files

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

-  Notes
(0047915)
Fabien Wang (reporter)
2011-04-30 08:12

This is related to Unity, not Lazarus.
(0047946)
Christian (reporter)
2011-05-01 13:48
edited on: 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.

(0047973)
Reinhard Berger (reporter)
2011-05-02 15:06

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 https://wiki.ubuntu.com/Ayatana" [^]

maybe this is the problem ?
(0047977)
Ludo Brands (developer)
2011-05-02 17:31

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: https://bugs.launchpad.net/ubuntu/natty/+source/overlay-scrollbar/+bug/770304, [^] https://launchpad.net/ubuntu/natty/+source/overlay-scrollbar/+changelog, [^] 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.
(0048000)
Ludo Brands (developer)
2011-05-03 11:37

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.
(0051363)
Flávio Etrusco (mantis doesn't notify me) (developer)
2011-09-01 19:25

I didn't realize it was working for TForm. Interesting, this means grids and TSynEdit would probably be fixed if converted to TScrollingWinControl :-)
(0051373)
Alexander Shishkin (reporter)
2011-09-02 09:19

"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." (https://wiki.ubuntu.com/Ayatana/ScrollBars [^])
(0056451)
Zeljan Rikalo (developer)
2012-02-04 14:38

This is ubuntu unity + liboverlay problem not fixable by us. export LIBOVERLAY_SCROLLBAR=0 is solution.
(0056524)
Christian (reporter)
2012-02-05 15:53

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.
(0056525)
Christian (reporter)
2012-02-05 15:54

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.
(0056527)
Mattias Gaertner (manager)
2012-02-05 16:46

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 https://launchpad.net/ubuntu/oneiric/+source/overlay-scrollbar [^] and download overlay-scrollbar_0.2.11.orig.tar.gz (374.7 KiB).
You will get an impressive list of applications:

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
(0056528)
Zeljan Rikalo (developer)
2012-02-05 16:54

@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).
(0056540)
Zeljan Rikalo (developer)
2012-02-05 18:35

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.

gboolean
os_utils_is_blacklisted (const gchar *program)
{
  /* Black-list of program names retrieved with g_get_prgname(). */
  static const gchar *blacklist[] = {
    "eclipse", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/769277 [^] */
    "emacs", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/847940 [^] */
    "emacs23", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/847940 [^] */
    "firefox", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/847922 [^] */
    "firefox-bin", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/847922 [^] */
    "firefox-trunk", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/847922 [^] */
    "gimp", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/803163 [^] */
    "gimp-2.6", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/803163 [^] */
    "gimp-2.7", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/803163 [^] */
    "gimp-2.8", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/803163 [^] */
    "gnucash", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/770304 [^] */
    "gvim", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/847943 [^] */
    "soffice", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/847918 [^] */
    "synaptic", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/755238 [^] */
    "thunderbird-bin", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/847929 [^] */
    "vinagre", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/847932 [^] */
    "vmplayer", /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/770625 [^] */
    "vmware"/* https://bugs.launchpad.net/ayatana-scrollbar/+bug/770625 [^] */
  };

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

  /* Black-list of symbols. */
  module = g_module_open (NULL, 0);
  /* https://bugs.launchpad.net/ayatana-scrollbar/+bug/847966 [^] */
  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;
}
(0056545)
Christian (reporter)
2012-02-05 21:21

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.
(0056547)
Zeljan Rikalo (developer)
2012-02-05 21:54

TCustomGrid is TCustomControl afair, and changing there something like that is a pretty huge task and I'm pesimistic about it.
(0070030)
Martin Friebe (manager)
2013-09-13 21:05

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

- 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 (mantis doesn't notify me) 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



MantisBT 1.2.12[^]
Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker