Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-06

gtk2 liboverlay Ubuntu Unity

7 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

Hi all,

The Ubuntu's Unity LIBOVERLAY override breaks the gtk_grab_add function, so mouse capturing does not work in synedit, treeview and many more LCL controls that descend from TCustomControl. That means dragging or selecting text with the mouse does not work.
This is true for many applications, which is why liboverlay has an internal list to disable itself for many famous applications (e.g. gimp). Maybe with some more time someone can find a remedy for the LCL.

The LCL will write a warning with 'debugln' if it spots liboverlay.

To disable liboverlay for a single application set the environment variable LIBOVERLAY_SCROLLBAR to '0' *before* starting the application. There is no way to disable liboverlay when the application is already running. For example:

LIBOVERLAY_SCROLLBAR=0 ./lazarus

You can disable it on a whole machine by uninstalling the package "liboverlay-scrollbar-0.2-0".

The IDE starter "startlazarus" now sets this variable before starting the IDE. startlazarus is called for example when you use the desktop menu item.

Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120626/2a16b656/attachment.html>

Reply by email

Bernd
to Mattias Gaertner

2012/6/26 Mattias Gaertner :

LIBOVERLAY_SCROLLBAR to '0' *before* starting the application. There is no way to disable liboverlay when the application is already running.

Maybe this should be reported as a bug/feature-request against Ubuntu (or whoever might be responsible for that nonsense). There must be an API call to disable it at runtime, otherwise it is incomplete.

Btw: what about setting the variable before the LCL units are initialized (earlier in the chain of unit uses), isn't this possible?

Reply by email

Henry Vermaak
to Mattias Gaertner: The Ubuntu's Unity LIBOVERLAY override breaks the gtk_grab_add function, so mouse…
Mattias Gaertner wrote 6 lines
To disable liboverlay for a single application set the environment variable LIBOVERLAY_SCROLLBAR to '0' *before* starting the application. There is no way to disable liboverlay when the application is already running. For example: LIBOVERLAY_SCROLLBAR=0 ./lazarus

Why not patch liboverlay similar to how it is done for qt?

http://bazaar.launchpad.net/~ayatana-scrollbar-team/ayatana-scrollbar/trunk/view/head:/os/os-scrollbar.c#L3974

Just export a function from lcl and catch that - like catching 'qt_startup_hook' in the above code.

Henry

Reply by email

Ludo Brands
to Henry Vermaak
Just export a function from lcl and catch that - like catching 'qt_startup_hook' in the above code.

That code has inspired me for the following hack:
In the project.lpr add the following code:

>>
Procedure qt_startup_hook;export;
Begin
End;
Exports qt_startup_hook;
<<<

This is enough to black-list your app. I'm not aware of any side effects exporting this symbol would have.

Ludo

Reply by email

Alexsander Rosa
to Ludo Brands

It seems a good hack, but it depends on their code...

2012/6/26 Ludo Brands

Show quoted text 30 lines
> Just export a function from lcl and catch that - > like catching 'qt_startup_hook' in the above code. That code has inspired me for the following hack: In the project.lpr add the following code: >>> Procedure qt_startup_hook;export; Begin End; Exports qt_startup_hook; <<< This is enough to black-list your app. I'm not aware of any side effects exporting this symbol would have. Ludo -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Atenciosamente, Alexsander da Rosa http://rednaxel.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120628/a30964d4/attachment.html>

Reply by email

Mattias Gaertner
to Alexsander Rosa

Alexsander Rosa hat am 28. Juni 2012 um 15:43
geschrieben:

It seems a good hack, but it depends on their code...

Another workaround was implemented. See
lcl/interfaces/gtk2/gtk2disableliboverlay.pas

Mattias

Show quoted text 39 lines
2012/6/26 Ludo Brands < <mailto:> > > > > > Just export a function from lcl and catch that - > > like catching 'qt_startup_hook' in the above code. > That code has inspired me for the following hack: > In the project.lpr add the following code: > >>> > Procedure qt_startup_hook;export; > Begin > End; > > Exports qt_startup_hook; > <<< > > > This is enough to black-list your app. I'm not aware of any side effects > exporting this symbol would have. > > Ludo > > > > > > -- > _______________________________________________ > Lazarus mailing list > > <mailto:> > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > <http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus> > > -- Atenciosamente, Alexsander da Rosa http://rednaxel.com <http://rednaxel.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120628/fd8225b5/attachment.html>

Reply by email