View Issue Details

IDProjectCategoryView StatusLast Update
0032515LazarusLCLpublic2017-10-13 16:54
ReporterMichlAssigned ToMichl 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platform64bitOSLinux Mint KDEOS Version17.3
Product Version1.9 (SVN)Product Build55976 
Target VersionFixed in Version1.9 (SVN) 
Summary0032515: GTK2: TPanel is ActiveControl
DescriptionIf you put a TSpeedButton on a TPanel and click it, the ActiveControl is TPanel instead of the actual focused one. Win32 and Qt works fine.

This issue is a result of revision 31561. If I comment the line (see patch), it works like with Win32 or Qt.
Steps To ReproduceTry added project and see how it works with TGroupBox on GTK2 vs. QT.
Additional InformationThe topic comes from German Lazarusforum: http://www.lazarusforum.de/viewtopic.php?f=10&t=11106
TagsNo tags attached.
Fixed in Revision56048
LazTarget-
WidgetsetGTK 2
Attached Files
  • Lostfocus.zip (2,457 bytes)
  • gtk2wsextctrls.pp.patch (571 bytes)
    Index: lcl/interfaces/gtk2/gtk2wsextctrls.pp
    ===================================================================
    --- lcl/interfaces/gtk2/gtk2wsextctrls.pp	(revision 55966)
    +++ lcl/interfaces/gtk2/gtk2wsextctrls.pp	(working copy)
    @@ -212,7 +212,7 @@
       WidgetClient := CreateFixedClientWidget(True);
     
       gtk_container_add(GTK_CONTAINER(Frame), WidgetClient);
    -  GTK_WIDGET_SET_FLAGS(Frame, GTK_CAN_FOCUS);
    +//  GTK_WIDGET_SET_FLAGS(Frame, GTK_CAN_FOCUS);
     
       WidgetInfo := CreateWidgetInfo(Frame, AWinControl, AParams);
       WidgetInfo^.ClientWidget := WidgetClient;
    

Relationships

related to 0032237 closedZeljan Rikalo Lazarus SourceEditor: editor does not get focus when switching tabs 
related to 0031900 closedZeljan Rikalo Lazarus Order of events: TEdit / TListBox 
related to 0032199 closedMichl Packages Sparta form designer component event and delete problems on gtk2 

Activities

Michl

2017-10-05 22:53

developer  

Lostfocus.zip (2,457 bytes)

Michl

2017-10-05 22:54

developer  

gtk2wsextctrls.pp.patch (571 bytes)
Index: lcl/interfaces/gtk2/gtk2wsextctrls.pp
===================================================================
--- lcl/interfaces/gtk2/gtk2wsextctrls.pp	(revision 55966)
+++ lcl/interfaces/gtk2/gtk2wsextctrls.pp	(working copy)
@@ -212,7 +212,7 @@
   WidgetClient := CreateFixedClientWidget(True);
 
   gtk_container_add(GTK_CONTAINER(Frame), WidgetClient);
-  GTK_WIDGET_SET_FLAGS(Frame, GTK_CAN_FOCUS);
+//  GTK_WIDGET_SET_FLAGS(Frame, GTK_CAN_FOCUS);
 
   WidgetInfo := CreateWidgetInfo(Frame, AWinControl, AParams);
   WidgetInfo^.ClientWidget := WidgetClient;

Zeljan Rikalo

2017-10-07 11:50

developer   ~0103229

And what if TPanel have TabStop := True ? Does it work with your patch ?

accorp

2017-10-10 02:45

reporter   ~0103318

This issue come up after r55062 and is related to 0032237.

Michl

2017-10-13 16:07

developer   ~0103410

@Zeljan: The patch was just to show, what I've done to hide the problem, not to apply it (so you maybe easier find a fix). If I read my comment again, I wasn't clear enough. Sorry for the hassle!

@accorp: Thank you very much for your hints! I use the same workaround as Zeljan in 0032237 to fix the issue.

Issue History

Date Modified Username Field Change
2017-10-05 22:53 Michl New Issue
2017-10-05 22:53 Michl Status new => assigned
2017-10-05 22:53 Michl Assigned To => Zeljan Rikalo
2017-10-05 22:53 Michl File Added: Lostfocus.zip
2017-10-05 22:54 Michl File Added: gtk2wsextctrls.pp.patch
2017-10-07 11:50 Zeljan Rikalo Note Added: 0103229
2017-10-07 11:50 Zeljan Rikalo Status assigned => feedback
2017-10-10 02:45 accorp Note Added: 0103318
2017-10-13 16:03 Michl Assigned To Zeljan Rikalo => Michl
2017-10-13 16:03 Michl Status feedback => assigned
2017-10-13 16:05 Michl Relationship added related to 0032237
2017-10-13 16:06 Michl Relationship added related to 0031900
2017-10-13 16:07 Michl Fixed in Revision => 56048
2017-10-13 16:07 Michl Note Added: 0103410
2017-10-13 16:07 Michl Status assigned => resolved
2017-10-13 16:07 Michl Fixed in Version => 1.9 (SVN)
2017-10-13 16:07 Michl Resolution open => fixed
2017-10-13 16:54 Michl Relationship added related to 0032199