Closed Bug 59194 Opened 26 years ago Closed 26 years ago

Widget needs click to get focus; this breaks when mouseover or sloppy focus is used in the WM

Categories

(Core Graveyard :: Embedding: GTK Widget, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aaronl, Assigned: blizzard)

Details

Attachments

(2 files)

Using SkipStone or TestGtkEmbed, I can go to a page and then click in the widget to use keyboard navigation keys such as the arrow keys, PgDown, etc. However, since I am using sloppy focus in my WM (sawfish), if I move the mouse out of the browser window and into another window, say a terminal, and then move the mouse back over the browser, refocusing it, the keyboard navigation keys no longer work! I have to click in the widget to give it focus again, seems it seems to assume click-to-focus WM focus mode and gives up focus until it is clicked on. This would get a "Severity: very annoying" if such a severity existed.
OK, thanks to Dave's guidance I've got a fix for this problem. I'm going to upload a patch in a moment. Dave, when this is uploaded can you review it for me? It's pretty small.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attached patch patch — — Splinter Review
Adam, I need you to review this as well. Please have a look at the attached patch since you own this code.
a=hyatt, but I want saari also to review to verify that this fits in with what we're doing in WebShellWindow (and to raise awareness that we'll need to touch two places now when we make changes to this code).
nsWebBrowser smells like the embedding version of nsWebShellWindow. How close is that to true?
It's pretty close.
If that's the case, then yeah, this has to be done. r=saari
Hi, It looks sane so assuming it was tested on Win32 and that it works when there is no content (i.e. before calling loadURI is called) then a=adamlock. One minor nit - put a break at the end of the NS_GOTFOCUS case instead of letting it fall through into the default handler.
Attached patch patch2 — — Splinter Review
This is a new patch that includes Adam's comment. Valeski has said that he's going to test on win32 for me.
using winembed as the harness, I didn't notice a difference between running these diffs and not. I tried tabbing, arrowing in form list boxes, page up/page down.
after talking w/ blizzard more about this, I don't see a diff in behavior, but I"m not seeing focused being fixed by these patches on windows. Looks like there are native event translation problems going from native to nsEvents. On windows, when the winembed window is brought back into focus, the NS_PAINT message comes through (I would have expected NS_ACTIVATE OR NS_GOTFOCUS). If I add NS_PAINT to the NS_GOTFOCUS case statement, it works great. Wierd. I'm not seeing a native windows message come through in widget/src/windows/nsWindow::ProcessMessage for straight alt-tab or window title bar mouse click behavior. Depending on window layering (if winembed is behind another window for example, and you alt-tab to it) you can get WM_PAINT (not handled by blizzard's patch) and a WM_GOTFOCUS (handled by blizzard's patch). blizzard's patch is the right direction and fixes unix. Once windows figures out how it wants to propegate messages it will work there too.
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: