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
3efda60e
Commit
3efda60e
authored
Jan 11, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Avoid pointer casts when background menu is created.
parent
9fe57a8a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
12 deletions
+17
-12
shell32_main.h
dlls/shell32/shell32_main.h
+1
-1
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+4
-2
shlview.c
dlls/shell32/shlview.c
+4
-6
shlview_cmenu.c
dlls/shell32/shlview_cmenu.c
+8
-3
No files found.
dlls/shell32/shell32_main.h
View file @
3efda60e
...
...
@@ -79,7 +79,7 @@ LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []) DECLSPEC_HI
LPCLASSFACTORY
IClassFactory_Constructor
(
REFCLSID
)
DECLSPEC_HIDDEN
;
IContextMenu2
*
ItemMenu_Constructor
(
IShellFolder
*
,
LPCITEMIDLIST
,
const
LPCITEMIDLIST
*
,
UINT
)
DECLSPEC_HIDDEN
;
IContextMenu2
*
BackgroundMenu_Constructor
(
IShellFolder
*
,
BOOL
)
DECLSPEC_HIDDEN
;
HRESULT
BackgroundMenu_Constructor
(
IShellFolder
*
,
BOOL
,
REFIID
,
void
**
)
DECLSPEC_HIDDEN
;
LPSHELLVIEW
IShellView_Constructor
(
LPSHELLFOLDER
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IFSFolder_Constructor
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
...
...
dlls/shell32/shfldr_desktop.c
View file @
3efda60e
...
...
@@ -530,10 +530,12 @@ static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface,
if
(
IsEqualIID
(
riid
,
&
IID_IContextMenu
))
{
if
(
cidl
>
0
)
{
pObj
=
(
LPUNKNOWN
)
ItemMenu_Constructor
(
(
IShellFolder
*
)
iface
,
This
->
pidlRoot
,
apidl
,
cidl
);
hr
=
S_OK
;
}
else
pObj
=
(
LPUNKNOWN
)
BackgroundMenu_Constructor
(
(
IShellFolder
*
)
iface
,
TRUE
);
hr
=
S_OK
;
return
BackgroundMenu_Constructor
((
IShellFolder
*
)
iface
,
TRUE
,
riid
,
ppvOut
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDataObject
)
&&
(
cidl
>=
1
))
{
...
...
dlls/shell32/shlview.c
View file @
3efda60e
...
...
@@ -1018,7 +1018,6 @@ static void ShellView_DoContextMenu(IShellViewImpl * This, WORD x, WORD y, BOOL
BOOL
fExplore
=
FALSE
;
HWND
hwndTree
=
0
;
LPCONTEXTMENU
pContextMenu
=
NULL
;
IContextMenu2
*
pCM
=
NULL
;
CMINVOKECOMMANDINFO
cmi
;
TRACE
(
"(%p)->(0x%08x 0x%08x 0x%08x) stub
\n
"
,
This
,
x
,
y
,
bDefault
);
...
...
@@ -1093,9 +1092,11 @@ static void ShellView_DoContextMenu(IShellViewImpl * This, WORD x, WORD y, BOOL
}
else
/* background context menu */
{
IContextMenu2
*
pCM
;
hMenu
=
CreatePopupMenu
();
pCM
=
BackgroundMenu_Constructor
(
This
->
pSFParent
,
FALSE
);
BackgroundMenu_Constructor
(
This
->
pSFParent
,
FALSE
,
&
IID_IContextMenu2
,
(
void
**
)
&
pCM
);
IContextMenu2_QueryContextMenu
(
pCM
,
hMenu
,
0
,
FCIDM_SHVIEWFIRST
,
FCIDM_SHVIEWLAST
,
0
);
uCommand
=
TrackPopupMenu
(
hMenu
,
TPM_LEFTALIGN
|
TPM_RETURNCMD
,
x
,
y
,
0
,
This
->
hWnd
,
NULL
);
...
...
@@ -2049,10 +2050,7 @@ static HRESULT WINAPI IShellView_fnGetItemObject(IShellView2 *iface, UINT uItem,
case
SVGIO_BACKGROUND
:
if
(
IsEqualIID
(
&
IID_IContextMenu
,
riid
))
{
*
ppvOut
=
BackgroundMenu_Constructor
(
This
->
pSFParent
,
FALSE
);
hr
=
S_OK
;
}
return
BackgroundMenu_Constructor
(
This
->
pSFParent
,
FALSE
,
riid
,
ppvOut
);
else
FIXME
(
"unsupported interface requested %s
\n
"
,
debugstr_guid
(
riid
));
...
...
dlls/shell32/shlview_cmenu.c
View file @
3efda60e
...
...
@@ -877,11 +877,14 @@ static const IContextMenu3Vtbl BackgroundContextMenuVtbl =
ContextMenu_HandleMenuMsg2
};
IContextMenu2
*
BackgroundMenu_Constructor
(
IShellFolder
*
parent
,
BOOL
desktop
)
HRESULT
BackgroundMenu_Constructor
(
IShellFolder
*
parent
,
BOOL
desktop
,
REFIID
riid
,
void
**
pObj
)
{
ContextMenu
*
This
;
HRESULT
hr
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IContextMenu3_iface
.
lpVtbl
=
&
BackgroundContextMenuVtbl
;
This
->
ref
=
1
;
This
->
parent
=
parent
;
...
...
@@ -895,6 +898,8 @@ IContextMenu2 *BackgroundMenu_Constructor(IShellFolder *parent, BOOL desktop)
This
->
desktop
=
desktop
;
if
(
parent
)
IShellFolder_AddRef
(
parent
);
TRACE
(
"(%p)
\n
"
,
This
);
return
(
IContextMenu2
*
)
&
This
->
IContextMenu3_iface
;
hr
=
IContextMenu3_QueryInterface
(
&
This
->
IContextMenu3_iface
,
riid
,
pObj
);
IContextMenu3_Release
(
&
This
->
IContextMenu3_iface
);
return
hr
;
}
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