View Issue Details

IDProjectCategoryView StatusLast Update
0013712LazarusLCLpublic2011-11-10 11:46
ReporterPeter KuhnAssigned ToJuha Manninen 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.9.26.1 (SVN)Product Build 
Target Version1.0.0Fixed in Version 
Summary0013712: TDateEdit: drag event in calendar makes interaction with desktop impossible
Description1. open a new project
2. put a TDateEdit on the form
3. compile and run
4. in the now running application open the small calendar by clicking on the button of the DateEdit
5. in the open calendar do following: drag one of the date numbers out of the small calendar

-> The mouse pointer icon switches to the drag item and no desktop interaction (neither mouse, nor keyboard) is possible.

I tried it on ubuntu 8.04 and Debian etch with fpc 2.2.2 and lazarus 0.9.26.1
as well as ubuntu 8.10 with fpc 2.2.3 and lazarus 0.9.27 beta (svn revision 17290).
In every case I had switch to a terminal and kill the running application to get back control about my desktop.
On Windows it works perfect (lazarus 0.9.26.2 fpc 2.2.2) so far.

regards
Peter
TagsNo tags attached.
Fixed in Revisionr33458
LazTarget1.0
WidgetsetGTK 2
Attached Files
  • calendar_drag.diff (690 bytes)
    Index: lcl/interfaces/gtk2/gtk2wscalendar.pp
    ===================================================================
    --- lcl/interfaces/gtk2/gtk2wscalendar.pp	(revisiĆ³n: 32725)
    +++ lcl/interfaces/gtk2/gtk2wscalendar.pp	(copia de trabajo)
    @@ -104,6 +104,8 @@
         SetCallback(LM_YEARCHANGED, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
         SetCallback(LM_DAYCHANGED, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
       end;
    +  g_signal_handlers_disconnect_by_func(PGtkObject(AWidgetInfo^.CoreWidget),
    +      TGTKSignalFunc(@GtkDragDataReceived), AWidgetInfo^.LCLObject);
     end;
     
     class function TGtk2WSCustomCalendar.GetCalendar(const ACalendar: TCustomCalendar): PGtkCalendar; //inline;
    
    calendar_drag.diff (690 bytes)

Relationships

related to 0010190 closedPaul Ishenin TCalendar crash when activating dsShowWeekNumbers through OI 
has duplicate 0020807 closedJuha Manninen TCalendar lock the screen on GTK2 

Activities

Peter Kuhn

2009-05-19 14:33

reporter   ~0027756

Last edited: 2009-05-19 21:17

I found that the problem seems to be with TCalendar and gtk2.
If you try the steps above with the TCalendar control you get the same result.

Using the gtk 1 library I have no problems.

Juha Manninen

2011-10-28 12:35

developer   ~0053546

I think dragging should be disabled for the calendar somehow.

 class function TGtk2WSCustomCalendar.CreateHandle
may be the right place but I don't know how to disable it.

August Klein

2011-10-29 01:03

reporter   ~0053573

@Juha
You can disconnect signal. I attach a patch.

2011-10-29 01:04

 

calendar_drag.diff (690 bytes)
Index: lcl/interfaces/gtk2/gtk2wscalendar.pp
===================================================================
--- lcl/interfaces/gtk2/gtk2wscalendar.pp	(revisiĆ³n: 32725)
+++ lcl/interfaces/gtk2/gtk2wscalendar.pp	(copia de trabajo)
@@ -104,6 +104,8 @@
     SetCallback(LM_YEARCHANGED, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
     SetCallback(LM_DAYCHANGED, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
   end;
+  g_signal_handlers_disconnect_by_func(PGtkObject(AWidgetInfo^.CoreWidget),
+      TGTKSignalFunc(@GtkDragDataReceived), AWidgetInfo^.LCLObject);
 end;
 
 class function TGtk2WSCustomCalendar.GetCalendar(const ACalendar: TCustomCalendar): PGtkCalendar; //inline;
calendar_drag.diff (690 bytes)

Juha Manninen

2011-11-10 11:45

developer   ~0053972

Applied.
Thanks August.

Issue History

Date Modified Username Field Change
2009-05-14 11:57 Peter Kuhn New Issue
2009-05-14 11:57 Peter Kuhn Widgetset => GTK 2
2009-05-15 16:22 Vincent Snijders LazTarget => 1.0
2009-05-15 16:22 Vincent Snijders Status new => acknowledged
2009-05-15 16:22 Vincent Snijders Target Version => 1.0.0
2009-05-19 14:33 Peter Kuhn Note Added: 0027756
2009-05-19 14:35 Peter Kuhn Note Edited: 0027756
2009-05-19 21:17 Peter Kuhn Note Edited: 0027756
2010-12-20 13:30 Juha Manninen Relationship added related to 0010190
2011-10-28 12:35 Juha Manninen Note Added: 0053546
2011-10-28 12:35 Juha Manninen Status acknowledged => confirmed
2011-10-29 01:03 August Klein Note Added: 0053573
2011-10-29 01:04 August Klein File Added: calendar_drag.diff
2011-11-10 11:45 Juha Manninen Status confirmed => resolved
2011-11-10 11:45 Juha Manninen Resolution open => fixed
2011-11-10 11:45 Juha Manninen Assigned To => Juha Manninen
2011-11-10 11:45 Juha Manninen Note Added: 0053972
2011-11-10 11:46 Juha Manninen Fixed in Revision => r33458
2011-12-05 00:30 Juha Manninen Relationship added has duplicate 0020807