Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d8e518eb
Commit
d8e518eb
authored
Jun 10, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Call UpdateUI and Exec(OLECMDID_UPDATECOMMANDS) from timer callback.
parent
03342918
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
1 deletion
+57
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+7
-0
view.c
dlls/mshtml/view.c
+50
-1
No files found.
dlls/mshtml/mshtml_private.h
View file @
d8e518eb
...
...
@@ -115,6 +115,8 @@ struct HTMLDocument {
BOOL
has_key_path
;
BOOL
container_locked
;
DWORD
update
;
ConnectionPoint
*
cp_htmldocevents
;
ConnectionPoint
*
cp_htmldocevents2
;
ConnectionPoint
*
cp_propnotif
;
...
...
@@ -382,6 +384,11 @@ typedef struct {
extern
const
cmdtable_t
editmode_cmds
[];
#define UPDATE_UI 0x0001
#define UPDATE_TITLE 0x0002
void
update_doc
(
HTMLDocument
*
This
,
DWORD
flags
);
/* editor */
void
set_ns_editmode
(
NSContainer
*
);
void
handle_edit_event
(
HTMLDocument
*
,
nsIDOMEvent
*
);
...
...
dlls/mshtml/view.c
View file @
d8e518eb
...
...
@@ -37,6 +37,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
#define TIMER_ID 0x1000
static
const
WCHAR
wszInternetExplorer_Server
[]
=
{
'I'
,
'n'
,
't'
,
'e'
,
'r'
,
'n'
,
'e'
,
't'
,
' '
,
'E'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
'_'
,
'S'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
...
...
@@ -94,6 +96,45 @@ static void activate_gecko(HTMLDocument *This)
nsIWebBrowserFocus_Activate
(
This
->
nscontainer
->
focus
);
}
void
update_doc
(
HTMLDocument
*
This
,
DWORD
flags
)
{
if
(
!
This
->
update
&&
This
->
hwnd
)
SetTimer
(
This
->
hwnd
,
TIMER_ID
,
100
,
NULL
);
This
->
update
|=
flags
;
}
static
LRESULT
on_timer
(
HTMLDocument
*
This
)
{
TRACE
(
"(%p) %x
\n
"
,
This
,
This
->
update
);
KillTimer
(
This
->
hwnd
,
TIMER_ID
);
if
(
!
This
->
update
)
return
0
;
if
(
This
->
update
&
UPDATE_UI
)
{
if
(
This
->
hostui
)
IDocHostUIHandler_UpdateUI
(
This
->
hostui
);
if
(
This
->
client
)
{
IOleCommandTarget
*
cmdtrg
;
HRESULT
hres
;
hres
=
IOleClientSite_QueryInterface
(
This
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
if
(
SUCCEEDED
(
hres
))
{
IOleCommandTarget_Exec
(
cmdtrg
,
NULL
,
OLECMDID_UPDATECOMMANDS
,
OLECMDEXECOPT_DONTPROMPTUSER
,
NULL
,
NULL
);
IOleCommandTarget_Release
(
cmdtrg
);
}
}
}
This
->
update
=
0
;
return
0
;
}
static
LRESULT
WINAPI
serverwnd_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
HTMLDocument
*
This
;
...
...
@@ -130,6 +171,9 @@ static LRESULT WINAPI serverwnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
LOWORD
(
lParam
)
-
2
*
ew
,
HIWORD
(
lParam
)
-
2
*
eh
,
SWP_NOZORDER
|
SWP_NOACTIVATE
);
}
break
;
case
WM_TIMER
:
return
on_timer
(
This
);
}
return
DefWindowProcW
(
hwnd
,
msg
,
wParam
,
lParam
);
...
...
@@ -211,8 +255,8 @@ static HRESULT activate_window(HTMLDocument *This)
/* NOTE:
* Windows implementation calls:
* RegisterWindowMessage("MSWHEEL_ROLLMSG");
* SetTimer(This->hwnd, TIMER_ID, 100, NULL);
*/
SetTimer
(
This
->
hwnd
,
TIMER_ID
,
100
,
NULL
);
}
This
->
in_place_active
=
TRUE
;
...
...
@@ -442,6 +486,7 @@ static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow)
if
(
FAILED
(
hres
))
return
hres
;
}
update_doc
(
This
,
UPDATE_UI
);
ShowWindow
(
This
->
hwnd
,
SW_SHOW
);
}
else
{
ShowWindow
(
This
->
hwnd
,
SW_HIDE
);
...
...
@@ -472,6 +517,8 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
return
hres
;
}
update_doc
(
This
,
UPDATE_UI
);
hres
=
IOleInPlaceSite_OnUIActivate
(
This
->
ipsite
);
if
(
SUCCEEDED
(
hres
))
{
OLECHAR
wszHTMLDocument
[
30
];
...
...
@@ -682,4 +729,6 @@ void HTMLDocument_View_Init(HTMLDocument *This)
This
->
in_place_active
=
FALSE
;
This
->
ui_active
=
FALSE
;
This
->
window_active
=
FALSE
;
This
->
update
=
0
;
}
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