Hello A. I was afraid you were going to say that! :-) My initial change actually did that, but then i ran into the problem that i need the request to fail, but not set an error-code. I could push/pop the current error code in user32 but that seemed a bit ugly. I could also single out that error code and then only translate the others. But what error code should be used then? Also seemed a bit ugly. Instead i have added a new member to the response to check if the request was "allowed". Seemed like the cleanest solution. Is this acceptable? I have attached a new patch which does this. Thanks, /pedro On Fri, 2010-01-08 at 10:06 +0100, Alexandre Julliard wrote:
Peter Dons Tychsen <donpedro(a)tdcadsl.dk> writes:
@@ -85,6 +85,17 @@ BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) HWND previous = 0; UINT flags = 0; BOOL ret; + GUITHREADINFO info; + if(!GetGUIThreadInfo(GetCurrentThreadId(), &info)) + { + return FALSE; + } + + /* if in menu mode, reject all requests to change focus, except if the menu bit is set */ + if((info.flags & GUI_INMENUMODE) && !(gui_flags & GUI_INMENUMODE)) + { + return FALSE; + }
This should be handled on the server side.