Ticket UUID: | 795608 | |||
Title: | tk binding problem in Gnome and Ximian | |||
Type: | Bug | Version: | None | |
Submitter: | donp1 | Created on: | 2003-08-26 21:01:53 | |
Subsystem: | bwidget | Assigned To: | jenglish | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2009-07-16 09:21:56 | |
Resolution: | None | Closed By: | sf-robot | |
Closed on: | 2009-07-16 02:21:56 | |||
Description: |
There seems to be a bug when a tk listbox is embedded inside a BWidget paned window frame. I have tried putting the listbox outside of the frame and it works correctly. This problem does not occur in KDE or using a vnc. Is this a tcl/tk bug or is there some default setting in Gnome or Ximian that needs to be changed in order for the double-click event to be recognized? Don | |||
User Comments: |
sf-robot added on 2009-07-16 09:21:56:
allow_comments - 1 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). oehhar added on 2009-07-01 14:56:47: Is this still an issue ? jenglish added on 2006-01-24 02:32:12: Logged In: YES user_id=68433 (I'm able to replicate the problem -- Debian sarge, using metacity WM under Gnome). Jason Tang posted an analysis of the problem to comp.lang.tcl (news:[email protected]), suggesting that the problem may be caused by (1) some WMs intercepting ButtonPress-1 events and generating multiple events in response combined with (2) the fixed EVENT_BUFFER_SIZE in tkBind.c. Specifically, a ButtonPress-1 ends up generating multiple EnterNotify events; if the window hierarchy is too deep, Tk's event buffer overflows, preventing the double-click detection logic from working. In a quick test, doubling EVENT_BUFFER_SIZE makes the attached double-click-bug.tcl work as expected. donp1 added on 2004-03-04 04:23:46: Logged In: YES user_id=849486 It works fine with other X servers, but what about Gnome and Ximian? hobbs added on 2004-02-04 06:23:05: Logged In: YES user_id=72656 this works find on my SuSE8.2 box, using CDE, KDE and Xwin32 as X servers. donp1 added on 2003-09-17 20:56:47: Logged In: YES user_id=849486 I have tested this script using Gnome and Ximian. donp1 added on 2003-09-17 20:55:13: Logged In: YES user_id=849486 OK, here is a much smaller example. Neither scripts work regardless... #! /usr/bin/wish package require BWidget set tlist [list "element1" "element2"] set mainframe [MainFrame .mainframe] set topf [frame [$mainframe getframe].topf] # Paned Windows and Frames set pw1 [PanedWindow $topf.pw -side top] set pane [$pw1 add ] set pw2 [PanedWindow $pane.pw2 -side left] set tpane [$pw2 add -weight 3] set tbox [TitleFrame $tpane.tbox -text "Widgets"] set sw_t [ScrolledWindow [$tbox getframe].sw -auto both] set tlistbox [listbox [$sw_t getframe].tlistbox -height 18 - width 20 -highlightthickness 0 -listvar ::tlist] $sw_t setwidget $tlistbox bindtags $tlistbox [linsert [bindtags $tlistbox] 3 tlist_Tag] bind tlist_Tag <Double-Button-1> {puts HI} # Placing layout frames and major subframes pack $mainframe -fill both -expand yes pack $topf -fill both -expand yes pack $pw1 -fill both -expand yes pack $pw2 -fill both -expand yes pack $tbox -padx 2 -side left -fill both -expand yes pack $sw_t -fill both -expand yes patthoyts added on 2003-09-10 17:53:19: Logged In: YES user_id=202636 You need to provide a much smaller example demonstrating the problem. package require BWidget PanedWindow .p .p add .p add set lb [listbox [.p getframe 0].list -bg white] set tb [text [.p getframe 1].text -bg yellow] pack $lb -fill both -expand 1 pack $tb -fill both -expand 1 pack .p -fill both -expand 1 foreach c [info vars] { $lb insert end $c } bind $lb <Double-Button-1> [list $tb insert end "CLICK\n"] Given this sample code, I don't see any problem. donp1 added on 2003-09-05 21:54:09: Logged In: YES user_id=849486 Has anyone had a chance to look at this problem? Is this a tcl/tk bug? donp1 added on 2003-08-27 04:01:53: File Added - 59873: double-click-bug.tcl |
Attachments:
- double-click-bug.tcl [download] added by donp1 on 2003-08-27 04:01:53. [details]