Few caveats regarding Windows code:

1. If you call SetFocus() API, it internally sends WM_KILLFOCUS to the
current focus owner, and WM_SETFOCUS to a window whose HWND you passed
in. That means it is not necessary to kill focus manually first, because
it is done automatically.

2. If Firefox does not set parent window for plugins (which I doubt it
can do anyway), your GetParent() call may return NULL. In that case,
SetFocus() won't work.

3. GetFocus() returns window handle only if that window is attached to
the calling thread's message queue which I doubt to be the case for
plugins.

So, most likely a proper way to SetFocus() would be to find browser
window's HWND by using some built-in method from the browser code
itself.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/263435

Title:
  Firefox cannot close tab (using Ctrl-w) when flash content is selected
  on page

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to