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
24eee97d
Commit
24eee97d
authored
Sep 27, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add a driver entry point for UpdateLayeredWindow.
parent
ddf41276
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
32 deletions
+67
-32
driver.c
dlls/user32/driver.c
+16
-0
exticon.c
dlls/user32/exticon.c
+1
-0
focus.c
dlls/user32/focus.c
+1
-0
hook.c
dlls/user32/hook.c
+1
-0
user_private.h
dlls/user32/user_private.h
+1
-0
win.c
dlls/user32/win.c
+2
-32
winproc.c
dlls/user32/winproc.c
+1
-0
window.c
dlls/winex11.drv/window.c
+43
-0
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+1
-0
No files found.
dlls/user32/driver.c
View file @
24eee97d
...
...
@@ -22,6 +22,7 @@
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
...
...
@@ -122,6 +123,7 @@ static const USER_DRIVER *load_driver(void)
GET_USER_FUNC
(
SetWindowText
);
GET_USER_FUNC
(
ShowWindow
);
GET_USER_FUNC
(
SysCommand
);
GET_USER_FUNC
(
UpdateLayeredWindow
);
GET_USER_FUNC
(
WindowMessage
);
GET_USER_FUNC
(
WindowPosChanging
);
GET_USER_FUNC
(
WindowPosChanged
);
...
...
@@ -413,6 +415,12 @@ static LRESULT CDECL nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam
return
-
1
;
}
static
BOOL
CDECL
nulldrv_UpdateLayeredWindow
(
HWND
hwnd
,
const
UPDATELAYEREDWINDOWINFO
*
info
,
const
RECT
*
window_rect
)
{
return
TRUE
;
}
static
LRESULT
CDECL
nulldrv_WindowMessage
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
return
0
;
...
...
@@ -489,6 +497,7 @@ static USER_DRIVER null_driver =
nulldrv_SetWindowText
,
nulldrv_ShowWindow
,
nulldrv_SysCommand
,
nulldrv_UpdateLayeredWindow
,
nulldrv_WindowMessage
,
nulldrv_WindowPosChanging
,
nulldrv_WindowPosChanged
...
...
@@ -757,6 +766,12 @@ static LRESULT CDECL loaderdrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lpar
return
load_driver
()
->
pSysCommand
(
hwnd
,
wparam
,
lparam
);
}
static
BOOL
CDECL
loaderdrv_UpdateLayeredWindow
(
HWND
hwnd
,
const
UPDATELAYEREDWINDOWINFO
*
info
,
const
RECT
*
window_rect
)
{
return
load_driver
()
->
pUpdateLayeredWindow
(
hwnd
,
info
,
window_rect
);
}
static
LRESULT
CDECL
loaderdrv_WindowMessage
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
return
load_driver
()
->
pWindowMessage
(
hwnd
,
msg
,
wparam
,
lparam
);
...
...
@@ -837,6 +852,7 @@ static USER_DRIVER lazy_load_driver =
loaderdrv_SetWindowText
,
loaderdrv_ShowWindow
,
loaderdrv_SysCommand
,
loaderdrv_UpdateLayeredWindow
,
loaderdrv_WindowMessage
,
loaderdrv_WindowPosChanging
,
loaderdrv_WindowPosChanged
...
...
dlls/user32/exticon.c
View file @
24eee97d
...
...
@@ -36,6 +36,7 @@
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "user_private.h"
...
...
dlls/user32/focus.c
View file @
24eee97d
...
...
@@ -27,6 +27,7 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "win.h"
#include "user_private.h"
...
...
dlls/user32/hook.c
View file @
24eee97d
...
...
@@ -70,6 +70,7 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "win.h"
...
...
dlls/user32/user_private.h
View file @
24eee97d
...
...
@@ -111,6 +111,7 @@ typedef struct tagUSER_DRIVER {
void
(
CDECL
*
pSetWindowText
)(
HWND
,
LPCWSTR
);
UINT
(
CDECL
*
pShowWindow
)(
HWND
,
INT
,
RECT
*
,
UINT
);
LRESULT
(
CDECL
*
pSysCommand
)(
HWND
,
WPARAM
,
LPARAM
);
BOOL
(
CDECL
*
pUpdateLayeredWindow
)(
HWND
,
const
UPDATELAYEREDWINDOWINFO
*
,
const
RECT
*
);
LRESULT
(
CDECL
*
pWindowMessage
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
void
(
CDECL
*
pWindowPosChanging
)(
HWND
,
HWND
,
UINT
,
const
RECT
*
,
const
RECT
*
,
RECT
*
,
struct
window_surface
**
);
void
(
CDECL
*
pWindowPosChanged
)(
HWND
,
HWND
,
UINT
,
const
RECT
*
,
const
RECT
*
,
const
RECT
*
,
const
RECT
*
,
struct
window_surface
*
);
...
...
dlls/user32/win.c
View file @
24eee97d
...
...
@@ -3648,7 +3648,6 @@ BOOL WINAPI UpdateLayeredWindowIndirect( HWND hwnd, const UPDATELAYEREDWINDOWINF
DWORD
flags
=
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOACTIVATE
|
SWP_NOREDRAW
;
RECT
window_rect
,
client_rect
;
SIZE
offset
;
BYTE
alpha
=
0xff
;
if
(
!
info
||
info
->
cbSize
!=
sizeof
(
*
info
)
||
...
...
@@ -3693,39 +3692,10 @@ BOOL WINAPI UpdateLayeredWindowIndirect( HWND hwnd, const UPDATELAYEREDWINDOWINF
TRACE
(
"window %p win %s client %s
\n
"
,
hwnd
,
wine_dbgstr_rect
(
&
window_rect
),
wine_dbgstr_rect
(
&
client_rect
)
);
set_window_pos
(
hwnd
,
0
,
flags
,
&
window_rect
,
&
client_rect
,
NULL
);
if
(
info
->
hdcSrc
)
{
HDC
hdc
=
GetWindowDC
(
hwnd
);
if
(
hdc
)
{
int
x
=
0
,
y
=
0
;
RECT
rect
;
GetWindowRect
(
hwnd
,
&
rect
);
OffsetRect
(
&
rect
,
-
rect
.
left
,
-
rect
.
top
);
if
(
info
->
pptSrc
)
{
x
=
info
->
pptSrc
->
x
;
y
=
info
->
pptSrc
->
y
;
}
if
(
!
USER_Driver
->
pUpdateLayeredWindow
(
hwnd
,
info
,
&
window_rect
))
return
FALSE
;
if
(
!
info
->
prcDirty
||
(
info
->
prcDirty
&&
IntersectRect
(
&
rect
,
&
rect
,
info
->
prcDirty
)))
{
TRACE
(
"copying window %p pos %d,%d
\n
"
,
hwnd
,
x
,
y
);
BitBlt
(
hdc
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
,
info
->
hdcSrc
,
rect
.
left
+
x
,
rect
.
top
+
y
,
SRCCOPY
);
}
ReleaseDC
(
hwnd
,
hdc
);
}
}
if
(
info
->
pblend
&&
!
(
info
->
dwFlags
&
ULW_OPAQUE
))
alpha
=
info
->
pblend
->
SourceConstantAlpha
;
TRACE
(
"setting window %p alpha %u
\n
"
,
hwnd
,
alpha
);
USER_Driver
->
pSetLayeredWindowAttributes
(
hwnd
,
info
->
crKey
,
alpha
,
info
->
dwFlags
&
(
LWA_ALPHA
|
LWA_COLORKEY
)
);
set_window_pos
(
hwnd
,
0
,
flags
,
&
window_rect
,
&
client_rect
,
NULL
);
return
TRUE
;
}
...
...
dlls/user32/winproc.c
View file @
24eee97d
...
...
@@ -28,6 +28,7 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "controls.h"
#include "win.h"
#include "user_private.h"
...
...
dlls/winex11.drv/window.c
View file @
24eee97d
...
...
@@ -2324,6 +2324,49 @@ void CDECL X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alph
}
/*****************************************************************************
* UpdateLayeredWindow (X11DRV.@)
*/
BOOL
CDECL
X11DRV_UpdateLayeredWindow
(
HWND
hwnd
,
const
UPDATELAYEREDWINDOWINFO
*
info
,
const
RECT
*
window_rect
)
{
BYTE
alpha
=
0xff
;
if
(
info
->
hdcSrc
)
{
HDC
hdc
=
GetWindowDC
(
hwnd
);
if
(
hdc
)
{
int
x
=
0
,
y
=
0
;
RECT
rect
;
GetWindowRect
(
hwnd
,
&
rect
);
OffsetRect
(
&
rect
,
-
rect
.
left
,
-
rect
.
top
);
if
(
info
->
pptSrc
)
{
x
=
info
->
pptSrc
->
x
;
y
=
info
->
pptSrc
->
y
;
}
if
(
!
info
->
prcDirty
||
(
info
->
prcDirty
&&
IntersectRect
(
&
rect
,
&
rect
,
info
->
prcDirty
)))
{
TRACE
(
"copying window %p pos %d,%d
\n
"
,
hwnd
,
x
,
y
);
BitBlt
(
hdc
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
,
info
->
hdcSrc
,
rect
.
left
+
x
,
rect
.
top
+
y
,
SRCCOPY
);
}
ReleaseDC
(
hwnd
,
hdc
);
}
}
if
(
info
->
pblend
&&
!
(
info
->
dwFlags
&
ULW_OPAQUE
))
alpha
=
info
->
pblend
->
SourceConstantAlpha
;
TRACE
(
"setting window %p alpha %u
\n
"
,
hwnd
,
alpha
);
X11DRV_SetLayeredWindowAttributes
(
hwnd
,
info
->
crKey
,
alpha
,
info
->
dwFlags
&
(
LWA_ALPHA
|
LWA_COLORKEY
)
);
return
TRUE
;
}
/**********************************************************************
* X11DRV_WindowMessage (X11DRV.@)
*/
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
24eee97d
...
...
@@ -51,6 +51,7 @@
@ cdecl SetWindowText(long wstr) X11DRV_SetWindowText
@ cdecl ShowWindow(long long ptr long) X11DRV_ShowWindow
@ cdecl SysCommand(long long long) X11DRV_SysCommand
@ cdecl UpdateLayeredWindow(long ptr ptr) X11DRV_UpdateLayeredWindow
@ cdecl WindowMessage(long long long long) X11DRV_WindowMessage
@ cdecl WindowPosChanging(long long long ptr ptr ptr ptr) X11DRV_WindowPosChanging
@ cdecl WindowPosChanged(long long long ptr ptr ptr ptr ptr) X11DRV_WindowPosChanged
...
...
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