From: SourceForge.net <no...@so...> - 2008-06-19 21:05:00
|
Bugs item #1639824, was opened at 2007-01-19 15:01 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1639824&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 21. [panedwindow] Group: obsolete: 8.5a5 Status: Open Resolution: None >Priority: 9 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Don Porter (dgp) Summary: Setting -sashwidth to 0 makes wish abort on X11 Initial Comment: In X11, setting the -sashwidth option of panedwindow to 0 makes wish abort with a bad X request when Tk try to create a proxy window. Apparently in X is invalid to create a window of width 0. emiliano@erizo:~$ wish8.4 % pack [panedwindow .pw -sashwidth 0] % .pw add [label .l1 -text Hello] % .pw add [label .l2 -text world] % and after resizing the pane I get: X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 1 (X_CreateWindow) Value in failed request: 0x0 Serial number of failed request: 232 Current serial number in output stream: 234 emiliano@erizo:~$ The same problem occurs if the proxy window is created by the script: emiliano@erizo:~$ wish8.4 % pack [panedwindow .pw -sashwidth 0] % .pw add [label .l1 -text Hello] % .pw add [label .l2 -text world] % .pw proxy place 0 0 X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 1 (X_CreateWindow) Value in failed request: 0x0 Serial number of failed request: 152 Current serial number in output stream: 154 emiliano@erizo:~$ ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2008-06-19 17:05 Message: Logged In: YES user_id=80530 Originator: NO must backport before 8.5.3 or 8.4.20 ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2008-05-14 05:03 Message: Logged In: YES user_id=79902 Originator: NO A fix is applied to the HEAD; needs someone to backport to earlier branches: 8.5, 8.4 only if there's going to be another release in that series. Handing off to release manager for decisions on that front. ---------------------------------------------------------------------- Comment By: Emiliano (egavilan) Date: 2008-05-13 19:35 Message: Logged In: YES user_id=1852298 Originator: NO I'm the original poster. The bug is still present in 8.5.2 After some source dive I come up with this patch that restrict the size of the proxy window to 1 pixel and above. This effectively workarounds the problem. --- generic/tkPanedWindow.c.orig 2008-05-13 19:52:10.000000000 -0300 +++ generic/tkPanedWindow.c 2008-05-13 20:04:08.000000000 -0300 @@ -2818,7 +2818,17 @@ x = 0; } y = Tk_InternalBorderWidth(pwPtr->tkwin); - sashWidth = pwPtr->sashWidth; + + /* If the sashwidth is less than 1, use 1 as the width of the + proxy window. This workarounds bug #1639824 + */ + + if (pwPtr->sashWidth > 0) { + sashWidth = pwPtr->sashWidth; + } else { + sashWidth = 1; + } + sashHeight = Tk_Height(pwPtr->tkwin) - (2 * Tk_InternalBorderWidth(pwPtr->tkwin)); } else { @@ -2826,7 +2836,13 @@ y = 0; } x = Tk_InternalBorderWidth(pwPtr->tkwin); - sashHeight = pwPtr->sashWidth; + + if (pwPtr->sashWidth > 0) { + sashHeight = pwPtr->sashWidth; + } else { + sashHeight = 1; + } + sashWidth = Tk_Width(pwPtr->tkwin) - (2 * Tk_InternalBorderWidth(pwPtr->tkwin)); } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1639824&group_id=12997 |