Cguiwindow::getfocuscontrol() doesnt return id - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Cguiwindow::getfocuscontrol() doesnt return id (/showthread.php?tid=8589) |
- Asteron - 2004-12-28 in my python script i noticed xbmcgui.window.getfocus() was not returning the correct control. i traced this problem to guilib/guiwindow.cpp Quote:int cguiwindow::getfocuscontrol() it is returning the control index lib/libpython/xbmcmodule/window.cpp - window_getfocus() assumes it is returning the control id. does any other code use this function and is counting on a control index? i think the line should be changed to Quote: if (pcontrol->hasfocus()) return pcontrol->getid(); i'd do the fix myself but dont have an environment setup (traced this just by browsing the cvs on sourceforge). - Bobbin007 - 2004-12-28 there is a function called getfocusedcontrol(). this returns the id of the focused control. greets bobbin007 - Asteron - 2004-12-28 lol ok... then the bug is just in xbmc/lib/libpython/xbmcmodule/window.cpp - window_getfocus() Quote:... should be Quote:... can someone make the fix? thanks -ast - Bobbin007 - 2005-01-02 fixed in cvs forgotten to reply greets bobbin007 |