View Issue Details

IDProjectCategoryView StatusLast Update
0009436PatchesLCLpublic2008-04-13 15:14
ReporterLuiz AmericoAssigned ToZeljan Rikalo 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi386OSUbuntuOS VersionFeist Fawn 7.04
Product Version0.9.23 (SVN)Product Build 
Target Version0.9.26Fixed in Version0.9.25 (SVN) 
Summary0009436: TPopupMenu.OnClose event does not work properly under gtk
DescriptionThe OnClose event of TPopupMenu is not fired when is closed. The event is only called just before the next time the menu is show (see the first line of TPopupMenu.PopUp method).

Attached is an example app and a patch.
TagsNo tags attached.
Fixed in Revision13956,13957,13958,14168
LazTarget0.9.26
WidgetsetGTK, GTK 2, QT
Attached Files

Relationships

related to 0015614 closedPaul Ishenin Lazarus TPopupMenu.Close() need rework 

Activities

2007-08-14 04:09

 

patchmenuclose.zip (1,246 bytes)

2007-08-14 04:09

 

example_menu_close_bug.zip (3,847 bytes)

Luiz Americo

2007-08-14 04:11

developer   ~0014144

The object.inc.diff file was manually edited to remove other changes i have in my svn copy. I did not tried to apply it.

Luiz Americo

2007-09-13 03:40

developer   ~0014625

The patch is buggy preventing the TMenuItem.OnClick call.

This occurs because TPopupMenu "deactivate" event is fired before TMenuItem "activate" event.

If the PopupMenu.Close call inside "deactivate" event is postponed using QueueAsyncCall it will work fine

Luiz Americo

2007-10-24 21:12

developer   ~0015726

This bug also occurs in Qt.

Luiz Americo

2007-12-28 16:12

developer   ~0016902

Attached is fixed patch.
It's updated up to svn 13056

2007-12-28 16:12

 

popup2.diff.zip (812 bytes)

Paul Ishenin

2008-02-03 09:29

manager   ~0017581

Please test and close if ok.

Bts, event sequence is differ on win32 and qt, gtk.

Win32: OnClose, OnClick
qt, gtk: OnClick, OnClose

Luiz Americo

2008-02-03 14:30

developer   ~0017587

Under gtk is all fine.

But under Qt, the popupmenu is not visible although the OnClick and OnClose events are fired.

Paul Ishenin

2008-02-04 00:18

manager   ~0017594

hmm - all fine under qt-windows

Zeljan Rikalo

2008-02-09 15:13

developer   ~0017662

Luiz, I've just tested popup menu (qt-4.3.3 - Linux) and everything seem to be OK
seq is OnPopup->OnClick->OnClose , all events are ok.
Can I close this ?

Luiz Americo

2008-02-11 00:42

developer   ~0017717

Last edited: 2008-02-11 01:10

I'm using Ubuntu 7.10 Gutsy Gibbon + Qt 4.3.2 + v0.9.25 r14073 i386-linux-gtk + binding 1.60 and i can confirm that popup menus are not working at all under Qt (even with the simplest popup menu application): the events OnClick and OnClose are fired but the menu is not visible.

Luiz Americo

2008-02-12 00:11

developer   ~0017731

Even main menu is not working under the environment i cited in previous post.

Zeljan Rikalo

2008-02-13 11:07

developer   ~0017745

hm..look at one piece of change log in qt-4.3.3 (I'm using 4.3.3) -
issue 279513

- QDialog
    * [281331] Fixed a bug that caused a QDialog with a modal parent to not
      be modal.
    * [279513] Fixed a bug that could occur when using the
      Qt::WindowStaysOnTopHint flag on dialogs that would cause the drop down
      menu to be hidden.

so it could be 4.3.2 bug (I know that your example contains normal window .. but anyway).

I've just tested your example and it works ok here. Let me remind you about my OS:
Linux, 2.6.20, XOrg-6.8.2, Qt-4.3.3, Lazarus 0.9.25 r14112

Luiz Americo

2008-02-18 03:48

developer   ~0017852

It's working now.
Can be marked as resolved.

Issue History

Date Modified Username Field Change
2007-08-14 04:09 Luiz Americo New Issue
2007-08-14 04:09 Luiz Americo File Added: patchmenuclose.zip
2007-08-14 04:09 Luiz Americo Widgetset => GTK, GTK 2
2007-08-14 04:09 Luiz Americo File Added: example_menu_close_bug.zip
2007-08-14 04:11 Luiz Americo Note Added: 0014144
2007-08-14 08:22 Vincent Snijders LazTarget => 0.9.26
2007-08-14 08:22 Vincent Snijders Status new => acknowledged
2007-09-13 03:40 Luiz Americo Note Added: 0014625
2007-10-24 21:12 Luiz Americo Note Added: 0015726
2007-10-24 21:19 Vincent Snijders Widgetset GTK, GTK 2 => GTK, GTK 2, QT
2007-12-28 16:12 Luiz Americo Note Added: 0016902
2007-12-28 16:12 Luiz Americo File Added: popup2.diff.zip
2008-02-03 09:29 Paul Ishenin Fixed in Revision => 13956,13957,13958
2008-02-03 09:29 Paul Ishenin Status acknowledged => resolved
2008-02-03 09:29 Paul Ishenin Fixed in Version => 0.9.25 (SVN)
2008-02-03 09:29 Paul Ishenin Resolution open => fixed
2008-02-03 09:29 Paul Ishenin Assigned To => Paul Ishenin
2008-02-03 09:29 Paul Ishenin Note Added: 0017581
2008-02-03 14:30 Luiz Americo Status resolved => feedback
2008-02-03 14:30 Luiz Americo Resolution fixed => reopened
2008-02-03 14:30 Luiz Americo Note Added: 0017587
2008-02-04 00:18 Paul Ishenin Note Added: 0017594
2008-02-04 00:18 Paul Ishenin Assigned To Paul Ishenin =>
2008-02-04 13:45 Vincent Snijders Status feedback => assigned
2008-02-04 13:45 Vincent Snijders Assigned To => Zeljan Rikalo
2008-02-09 15:13 Zeljan Rikalo Note Added: 0017662
2008-02-11 00:42 Luiz Americo Note Added: 0017717
2008-02-11 01:10 Luiz Americo Note Edited: 0017717
2008-02-12 00:11 Luiz Americo Note Added: 0017731
2008-02-13 11:07 Zeljan Rikalo Note Added: 0017745
2008-02-18 03:48 Luiz Americo Note Added: 0017852
2008-02-18 05:39 Paul Ishenin Fixed in Revision 13956,13957,13958 => 13956,13957,13958,14168
2008-02-18 05:39 Paul Ishenin Status assigned => resolved
2008-02-18 05:39 Paul Ishenin Resolution reopened => fixed
2008-02-18 10:32 Luiz Americo Status resolved => closed
2008-04-13 15:14 Vincent Snijders Target Version => 0.9.26
2010-01-29 04:20 Paul Ishenin Relationship added related to 0015614