From: John T. <nu...@me...> - 2012-07-29 04:19:14
|
Fixed the broken X11 menus. You owe me one, I was really not at all in the mood for bug hunting right now :) Florian Echtler's MPX Patch which got into the main trunk sometime between releases 2.6.0 and 2.8.0 completely broke menus under X11 and probably other things that went unnoticed. The result of registering for XInput events, is a complete override of the regular X11 Entry/Exit, Motion, and Button events. Instead of the "standard" events, the client receives corresponding XInput events through the GenericEvent mechanism, which contain more information, such as the source of the input event, etc. The XInput event handler in freeglut, after calling any Multi* callbacks, proceeded to simply call the standard motion and button callbacks as well, forgetting about the entry/exit callbacks completely and also forgetting that the standard Button/Motion handlers do much more than just call the callback, like for instance, menu handling. To fix this I removed the simplistic INVOKE_WCB call for the standard events from the XInput handler, and I created a fake "standard" event structure, filling it with all the relevant details. This event is then pushed at the front of the X event queue with XPutBackEvent, to be handled in the regular way at the next iteration of the event handling loop in fgPlatformProcessSingleEvent[1]. I commited the fix in revision 1375, but as I mentioned in a previous email the UNIX build is broken at the moment due to some ad-hoc win32 calls in the cross-platform parts of the code (fg_menu.c). I worked on this from a previous revision (1367). [1] that's clearly a misnomer as this function processes all pending events (as it should), not a single one. -- John Tsiombikas http://nuclear.mutantstargoat.com/ |
From: Diederick C. N. <dc...@gm...> - 2012-07-29 05:29:44
|
Hi John, Thanks a lot for taking the time to find out the problem, just for the aim of keeping freeglut healthy. I'm sorry for putting some windows only code there, I have no hidden it behind the function fghPlatformGetCursorPos. I have tried to implement this as well on X11 (last function in fg_cursor_x11), but that is of course untested. Thanks again! Best, Dee On Sun, Jul 29, 2012 at 12:19 PM, John Tsiombikas <nu...@me...> wrote: > Fixed the broken X11 menus. You owe me one, I was really not at all in > the mood for bug hunting right now :) > > Florian Echtler's MPX Patch which got into the main trunk sometime > between releases 2.6.0 and 2.8.0 completely broke menus under X11 and > probably other things that went unnoticed. > > The result of registering for XInput events, is a complete override > of the regular X11 Entry/Exit, Motion, and Button events. Instead of > the "standard" events, the client receives corresponding XInput events > through the GenericEvent mechanism, which contain more information, such > as the source of the input event, etc. > > The XInput event handler in freeglut, after calling any Multi* > callbacks, proceeded to simply call the standard motion and button > callbacks as well, forgetting about the entry/exit callbacks completely > and also forgetting that the standard Button/Motion handlers do much > more than just call the callback, like for instance, menu handling. > > To fix this I removed the simplistic INVOKE_WCB call for the standard > events from the XInput handler, and I created a fake "standard" event > structure, filling it with all the relevant details. This event is then > pushed at the front of the X event queue with XPutBackEvent, to be > handled in the regular way at the next iteration of the event handling > loop in fgPlatformProcessSingleEvent[1]. > > I commited the fix in revision 1375, but as I mentioned in a previous > email the UNIX build is broken at the moment due to some ad-hoc win32 > calls in the cross-platform parts of the code (fg_menu.c). I worked on > this from a previous revision (1367). > > > [1] that's clearly a misnomer as this function processes all pending > events (as it should), not a single one. > > -- > John Tsiombikas > http://nuclear.mutantstargoat.com/ > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Freeglut-developer mailing list > Fre...@li... > https://lists.sourceforge.net/lists/listinfo/freeglut-developer |
From: Diederick C. N. <dc...@gm...> - 2012-07-29 05:35:31
|
Hi John F, Is there some way we can provide a 2.8.1 release that fixes the regressions in menus in 2.8 for both X11 and windows? 3.0 is not just around the corner... Best, Dee On Sun, Jul 29, 2012 at 1:29 PM, Diederick C. Niehorster <dc...@gm...> wrote: > Hi John, > > Thanks a lot for taking the time to find out the problem, just for the > aim of keeping freeglut healthy. > I'm sorry for putting some windows only code there, I have no hidden > it behind the function fghPlatformGetCursorPos. I have tried to > implement this as well on X11 (last function in fg_cursor_x11), but > that is of course untested. > > Thanks again! > Best, > Dee > > On Sun, Jul 29, 2012 at 12:19 PM, John Tsiombikas > <nu...@me...> wrote: >> Fixed the broken X11 menus. You owe me one, I was really not at all in >> the mood for bug hunting right now :) >> >> Florian Echtler's MPX Patch which got into the main trunk sometime >> between releases 2.6.0 and 2.8.0 completely broke menus under X11 and >> probably other things that went unnoticed. >> >> The result of registering for XInput events, is a complete override >> of the regular X11 Entry/Exit, Motion, and Button events. Instead of >> the "standard" events, the client receives corresponding XInput events >> through the GenericEvent mechanism, which contain more information, such >> as the source of the input event, etc. >> >> The XInput event handler in freeglut, after calling any Multi* >> callbacks, proceeded to simply call the standard motion and button >> callbacks as well, forgetting about the entry/exit callbacks completely >> and also forgetting that the standard Button/Motion handlers do much >> more than just call the callback, like for instance, menu handling. >> >> To fix this I removed the simplistic INVOKE_WCB call for the standard >> events from the XInput handler, and I created a fake "standard" event >> structure, filling it with all the relevant details. This event is then >> pushed at the front of the X event queue with XPutBackEvent, to be >> handled in the regular way at the next iteration of the event handling >> loop in fgPlatformProcessSingleEvent[1]. >> >> I commited the fix in revision 1375, but as I mentioned in a previous >> email the UNIX build is broken at the moment due to some ad-hoc win32 >> calls in the cross-platform parts of the code (fg_menu.c). I worked on >> this from a previous revision (1367). >> >> >> [1] that's clearly a misnomer as this function processes all pending >> events (as it should), not a single one. >> >> -- >> John Tsiombikas >> http://nuclear.mutantstargoat.com/ >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Freeglut-developer mailing list >> Fre...@li... >> https://lists.sourceforge.net/lists/listinfo/freeglut-developer |
From: John T. <nu...@me...> - 2012-07-29 15:19:16
|
On Sun, Jul 29, 2012 at 01:29:37PM +0800, Diederick C. Niehorster wrote: > I'm sorry for putting some windows only code there, I have no hidden > it behind the function fghPlatformGetCursorPos. I have tried to > implement this as well on X11 (last function in fg_cursor_x11), but > that is of course untested. Works fine :) -- John Tsiombikas http://nuclear.mutantstargoat.com/ |