From: SourceForge.net <no...@so...> - 2010-06-01 16:48:17
|
Patches item #3009998, was opened at 2010-06-01 09:31 Message generated for change (Comment added) made by jenglish You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312997&aid=3009998&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: 01. Bindings Group: None Status: Open Resolution: None Priority: 7 Private: No Submitted By: Joe English (jenglish) Assigned to: Joe English (jenglish) Summary: Binding procedure reform Initial Comment: Attached patch winscrollbar-bindproc replaces the TkBindEvalProc ScrollbarBindProc with an ordinary event handler. (Description to follow). ---------------------------------------------------------------------- >Comment By: Joe English (jenglish) Date: 2010-06-01 09:48 Message: Notes: win/tkWinScrlbr.c is the only place where the TK_DEFER_MODAL / ClassProcs.modalLoopProc() machinery has ever been used in Tk. carbon/tkMacOSXScrlbr.c (formerly macosx/tkMacOSXScrlbr,c, formerly mac/tkMacScrlbr.c) has similar environmental constraints as the Windows-native scrollbar, but it calls the tracking loop directly from ScrollbarBindProc. I can't tell what the current macosx scrollbar implementation is doing, but all of the other Windows and Carbon native controls that require a modal loop enter it directly from a command procedure, event handler, or (in one case, see next patch) a binding procedure. ---------------------------------------------------------------------- Comment By: Joe English (jenglish) Date: 2010-06-01 09:38 Message: Current control flow in response to a ButtonPress event is: - Tk_HandleEvent() calls TkBindEventProc calls Tk_BindEvent, - which queues and later calls ScrollbarBindProc (binding procedure on "Scrollbar" bindtag) - which sets the TK_DEFER_MODAL flag and returns. - Later, Tk_BindEvent sees that TK_DEFER_MODAL has been set - and calls winPtr->classProcsPtr->modalProc() - which is ModalLoopProc in win/tkWinScrlbar.c, - which passes (what it assumes is a) ButtonPress event to TkWinResendEvent - which reformats it as a Windows message and passes it to the Windows L"ScrollBar" WndProc, - which enters a modal loop. After the patch, the control flow is: - Tk_HandleEvent() calls WinScrollbarEventProc (registered event handler), - which calls ModalLoop() directly - which passes the ButtonPress event to TkWinResentEvent ... - which proceeds as before. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312997&aid=3009998&group_id=12997 |