View Issue Details

IDProjectCategoryView StatusLast Update
0037815LazarusLCLpublic2021-04-06 18:01
ReporterChris Rorden Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
PlatformRyzen 3900xOSUbuntu 20.04 
Product Version2.1 (SVN) 
Summary0037815: GTK3: TTrackbar Frozen if Form has Panel
DescriptionWith GTK3, one can not move the position of a trackbar if the form has a Panel.
Steps To ReproducePlace TTrackBar and TPanel on Form, run program. Attempt to move trackbar.
TagsNo tags attached.
Fixed in Revisionr64740
LazTarget-
WidgetsetGTK 3
Attached Files

Relationships

related to 0038562 closedJuha Manninen gtk3: TPanel.OnPaint don't work 

Activities

Chris Rorden

2020-09-25 22:26

reporter  

gtk3_ttrackbar.zip (108,961 bytes)

Anton Kavalenka

2020-09-26 07:51

reporter   ~0125865

Can not reproduce. Trackbar is moving either by mouse or keyboard [PgUp] [PgDn]
Maybe try remove the lazarus/lcl/units/*

Juha Manninen

2020-09-26 11:24

developer   ~0125866

Last edited: 2020-09-26 11:25

View 2 revisions

I can reproduce in my Manjaro + KDE system.
The numeric part works and gets updated but the graphical slider does not. Strange, how can a native GTK3 widget work only partially?
Indeed if I remove the Panel, the graphical slider works.
One more issue: if I add a TrackBar onto the Panel as in Anton's screenshot, the application refuses to close. It must be killed.

This must be related to a desktop system or to library versions. My Manjaro has KDE and recent versions of libs.
Ubuntu 20.04 has either Gnome or Unity. Which is it?
Anton, your system appears to be more GTK3 friendly. What is it?
GTK3_trackbar_JuMa.png (9,609 bytes)   
GTK3_trackbar_JuMa.png (9,609 bytes)   

Anton Kavalenka

2020-09-26 12:06

reporter   ~0125869

My desktop and notebook both Debian GNU/Linux 10.4 stable with GNOME 3.28

Anton Kavalenka

2020-09-26 13:21

reporter   ~0125870

This problem may be related to themes.
AFAIK there is special packages that make GTK and QT appear similar with current chosen theme.
These packages has to be installed separately.

Juha Manninen

2020-09-27 18:40

developer   ~0125904

I doubt it is only about themes.
Remember, a Panel on the form affects the behavior even when it is not the Parent of the TrackBar.

Anton Kavalenka

2020-09-27 18:49

reporter   ~0125905

Last edited: 2020-09-27 20:47

View 3 revisions

ufff, got to install Plasma desktop ...

Can confirm. Thumb not moves.

What I found:
* Not just panel placed to a form prevents TrackBar update but aligned panel (Align<>alNone).
* Manually resizing (slightly drag the corner of Form) restores proper behavior of Trackbar. This make any pending size updates finished.

The resume - Alignment leaves WS sizing state unfinished under non-GTK window manager.

Anton Kavalenka

2021-03-05 11:53

reporter   ~0129397

Last edited: 2021-03-07 07:47

View 2 revisions

@Chris Rorden and @Juha Manninen

Looks like frozen TTrackBar is fixed by patch in 0038562

Juha Manninen

2021-03-07 08:48

developer   ~0129458

Great. Resolving.

Chris Rorden

2021-04-05 17:24

reporter   ~0130109

This issue is not resolved for Lazarus SVN 64927 with my Ubuntu 20.04. The trackbar works fine if there is no panel present. If a panel is present, the movement of the trackball slider is constrained to the right side of the slider (e.g. the slider range should be 1..10, but when set to 10 the trackball position appears near the far left, not right). I did clear out units folders, rebuild Lazarus, etc.

Chris Rorden

2021-04-06 18:01

reporter   ~0130139

@Anton Kavalenka your finding that manually resizing restores behavior is accurate. Here is a great and desperate cure based on this finding. I am not advocating this, but it does make me wonder if a refresh/invalidate needs to be called at some stage:

procedure TForm1.FormActivate(Sender: TObject);
begin
   Form1.width := Form1.width +1;
end;

Issue History

Date Modified Username Field Change
2020-09-25 22:26 Chris Rorden New Issue
2020-09-25 22:26 Chris Rorden File Added: gtk3_ttrackbar.zip
2020-09-26 07:51 Anton Kavalenka Note Added: 0125865
2020-09-26 07:51 Anton Kavalenka File Added: Здымак экрана, 2020-09-26 08-48-41.png
2020-09-26 11:24 Juha Manninen Note Added: 0125866
2020-09-26 11:24 Juha Manninen File Added: GTK3_trackbar_JuMa.png
2020-09-26 11:25 Juha Manninen Note Edited: 0125866 View Revisions
2020-09-26 12:06 Anton Kavalenka Note Added: 0125869
2020-09-26 13:21 Anton Kavalenka Note Added: 0125870
2020-09-27 18:40 Juha Manninen Note Added: 0125904
2020-09-27 18:49 Anton Kavalenka Note Added: 0125905
2020-09-27 19:50 Anton Kavalenka Note Edited: 0125905 View Revisions
2020-09-27 20:47 Anton Kavalenka Note Edited: 0125905 View Revisions
2021-03-03 16:40 Juha Manninen Relationship added related to 0038562
2021-03-05 11:53 Anton Kavalenka Note Added: 0129397
2021-03-07 07:47 Anton Kavalenka Note Edited: 0129397 View Revisions
2021-03-07 08:48 Juha Manninen Assigned To => Juha Manninen
2021-03-07 08:48 Juha Manninen Status new => resolved
2021-03-07 08:48 Juha Manninen Resolution open => fixed
2021-03-07 08:48 Juha Manninen Fixed in Revision => r64740
2021-03-07 08:48 Juha Manninen LazTarget => -
2021-03-07 08:48 Juha Manninen Widgetset GTK 3 => GTK 3
2021-03-07 08:49 Juha Manninen Note Added: 0129458
2021-04-05 17:24 Chris Rorden Status resolved => assigned
2021-04-05 17:24 Chris Rorden Resolution fixed => open
2021-04-05 17:24 Chris Rorden Note Added: 0130109
2021-04-06 18:01 Chris Rorden Note Added: 0130139