Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
7cdad62b
Commit
7cdad62b
authored
Apr 13, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Improved focus handling.
parent
b6765134
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
24 deletions
+14
-24
editor.c
dlls/mshtml/editor.c
+0
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+0
-2
nsembed.c
dlls/mshtml/nsembed.c
+6
-18
nsevents.c
dlls/mshtml/nsevents.c
+2
-2
view.c
dlls/mshtml/view.c
+6
-1
No files found.
dlls/mshtml/editor.c
View file @
7cdad62b
...
...
@@ -508,7 +508,6 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event)
void
handle_edit_load
(
HTMLDocument
*
This
)
{
This
->
doc_obj
->
nscontainer
->
reset_focus
=
GetFocus
();
get_editor_controller
(
This
->
doc_obj
->
nscontainer
);
}
...
...
dlls/mshtml/mshtml_private.h
View file @
7cdad62b
...
...
@@ -437,8 +437,6 @@ struct NSContainer {
nsIURIContentListener
*
content_listener
;
HWND
hwnd
;
HWND
reset_focus
;
/* hack */
};
typedef
struct
nsWineURI
nsWineURI
;
...
...
dlls/mshtml/nsembed.c
View file @
7cdad62b
...
...
@@ -80,8 +80,6 @@ static const WCHAR wszNsContainer[] = {'N','s','C','o','n','t','a','i','n','e','
static
ATOM
nscontainer_class
;
#define WM_RESETFOCUS_HACK WM_USER+600
static
LRESULT
WINAPI
nsembed_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
NSContainer
*
This
;
...
...
@@ -106,20 +104,13 @@ static LRESULT WINAPI nsembed_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
WARN
(
"SetSize failed: %08x
\n
"
,
nsres
);
break
;
case
WM_RESETFOCUS_HACK
:
/*
* FIXME
* Gecko grabs focus in edit mode and some apps don't like it.
* We should somehow prevent grabbing focus.
*/
TRACE
(
"WM_RESETFOCUS_HACK
\n
"
);
case
WM_PARENTNOTIFY
:
TRACE
(
"WM_PARENTNOTIFY %x
\n
"
,
(
unsigned
)
wParam
);
if
(
This
->
reset_focus
)
{
SetFocus
(
This
->
reset_focus
);
This
->
reset_focus
=
NULL
;
if
(
This
->
doc
)
This
->
doc
->
focus
=
FALSE
;
switch
(
wParam
)
{
case
WM_LBUTTONDOWN
:
case
WM_RBUTTONDOWN
:
nsIWebBrowserFocus_Activate
(
This
->
focus
);
}
}
...
...
@@ -1316,9 +1307,6 @@ static nsresult NSAPI nsEmbeddingSiteWindow_SetFocus(nsIEmbeddingSiteWindow *ifa
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
reset_focus
)
PostMessageW
(
This
->
hwnd
,
WM_RESETFOCUS_HACK
,
0
,
0
);
return
nsIBaseWindow_SetFocus
(
This
->
window
);
}
...
...
dlls/mshtml/nsevents.c
View file @
7cdad62b
...
...
@@ -129,7 +129,7 @@ static nsresult NSAPI handle_blur(nsIDOMEventListener *iface, nsIDOMEvent *event
return
NS_ERROR_FAILURE
;
doc_obj
=
doc
->
basedoc
.
doc_obj
;
if
(
!
doc_obj
->
nscontainer
->
reset_focus
&&
doc_obj
->
focus
&&
!
is_doc_child_focus
(
doc_obj
))
{
if
(
doc_obj
->
focus
&&
!
is_doc_child_focus
(
doc_obj
))
{
doc_obj
->
focus
=
FALSE
;
notif_focus
(
doc_obj
);
}
...
...
@@ -148,7 +148,7 @@ static nsresult NSAPI handle_focus(nsIDOMEventListener *iface, nsIDOMEvent *even
return
NS_ERROR_FAILURE
;
doc_obj
=
doc
->
basedoc
.
doc_obj
;
if
(
!
doc_obj
->
nscontainer
->
reset_focus
&&
!
doc_obj
->
focus
)
{
if
(
!
doc_obj
->
focus
)
{
doc_obj
->
focus
=
TRUE
;
notif_focus
(
doc_obj
);
}
...
...
dlls/mshtml/view.c
View file @
7cdad62b
...
...
@@ -92,7 +92,6 @@ static void activate_gecko(NSContainer *This)
nsIBaseWindow_SetVisibility
(
This
->
window
,
TRUE
);
nsIBaseWindow_SetEnabled
(
This
->
window
,
TRUE
);
nsIWebBrowserFocus_Activate
(
This
->
focus
);
}
void
update_doc
(
HTMLDocument
*
This
,
DWORD
flags
)
...
...
@@ -216,6 +215,10 @@ static LRESULT WINAPI serverwnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
break
;
case
WM_TIMER
:
return
on_timer
(
This
);
case
WM_SETFOCUS
:
TRACE
(
"(%p) WM_SETFOCUS
\n
"
,
This
);
nsIWebBrowserFocus_Activate
(
This
->
nscontainer
->
focus
);
break
;
case
WM_MOUSEACTIVATE
:
return
MA_ACTIVATE
;
}
...
...
@@ -664,6 +667,8 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
This
->
doc_obj
->
ui_active
=
TRUE
;
}
else
{
This
->
doc_obj
->
focus
=
FALSE
;
nsIWebBrowserFocus_Deactivate
(
This
->
doc_obj
->
nscontainer
->
focus
);
if
(
This
->
doc_obj
->
ui_active
)
{
This
->
doc_obj
->
ui_active
=
FALSE
;
if
(
This
->
doc_obj
->
ip_window
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment