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
ea1d71c7
Commit
ea1d71c7
authored
Apr 16, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Set the NET_WM_ICON hint for 32-bpp icons.
parent
ab13ffa4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
4 deletions
+42
-4
window.c
dlls/winex11.drv/window.c
+40
-4
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+1
-0
No files found.
dlls/winex11.drv/window.c
View file @
ea1d71c7
...
...
@@ -835,22 +835,58 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data, HICO
{
HBITMAP
hbmOrig
;
RECT
rcMask
;
BITMAP
bm
Mask
;
BITMAP
bm
;
ICONINFO
ii
;
HDC
hDC
;
GetIconInfo
(
hIcon
,
&
ii
);
GetObject
A
(
ii
.
hbmMask
,
sizeof
(
bmMask
),
&
bmMask
);
GetObject
W
(
ii
.
hbmMask
,
sizeof
(
bm
),
&
bm
);
rcMask
.
top
=
0
;
rcMask
.
left
=
0
;
rcMask
.
right
=
bm
Mask
.
bmWidth
;
rcMask
.
bottom
=
bm
Mask
.
bmHeight
;
rcMask
.
right
=
bm
.
bmWidth
;
rcMask
.
bottom
=
bm
.
bmHeight
;
hDC
=
CreateCompatibleDC
(
0
);
hbmOrig
=
SelectObject
(
hDC
,
ii
.
hbmMask
);
InvertRect
(
hDC
,
&
rcMask
);
SelectObject
(
hDC
,
ii
.
hbmColor
);
/* force the color bitmap to x11drv mode too */
GetObjectW
(
ii
.
hbmColor
,
sizeof
(
bm
),
&
bm
);
if
(
bm
.
bmBitsPixel
==
32
)
/* FIXME: do this for other depths too */
{
BITMAPINFO
info
;
unsigned
int
size
,
*
bits
;
info
.
bmiHeader
.
biSize
=
sizeof
(
info
);
info
.
bmiHeader
.
biWidth
=
bm
.
bmWidth
;
info
.
bmiHeader
.
biHeight
=
-
bm
.
bmHeight
;
info
.
bmiHeader
.
biPlanes
=
1
;
info
.
bmiHeader
.
biBitCount
=
32
;
info
.
bmiHeader
.
biCompression
=
BI_RGB
;
info
.
bmiHeader
.
biSizeImage
=
bm
.
bmWidth
*
bm
.
bmHeight
*
4
;
info
.
bmiHeader
.
biXPelsPerMeter
=
0
;
info
.
bmiHeader
.
biYPelsPerMeter
=
0
;
info
.
bmiHeader
.
biClrUsed
=
0
;
info
.
bmiHeader
.
biClrImportant
=
0
;
size
=
bm
.
bmWidth
*
bm
.
bmHeight
+
2
;
bits
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
long
)
);
if
(
bits
&&
GetDIBits
(
hDC
,
ii
.
hbmColor
,
0
,
bm
.
bmHeight
,
bits
+
2
,
&
info
,
DIB_RGB_COLORS
))
{
bits
[
0
]
=
bm
.
bmWidth
;
bits
[
1
]
=
bm
.
bmHeight
;
if
(
sizeof
(
long
)
>
sizeof
(
int
))
/* convert to array of longs */
{
int
i
=
size
;
while
(
--
i
>=
0
)
((
unsigned
long
*
)
bits
)[
i
]
=
bits
[
i
];
}
wine_tsx11_lock
();
XChangeProperty
(
display
,
data
->
whole_window
,
x11drv_atom
(
_NET_WM_ICON
),
XA_CARDINAL
,
32
,
PropModeReplace
,
(
unsigned
char
*
)
bits
,
size
);
wine_tsx11_unlock
();
}
HeapFree
(
GetProcessHeap
(),
0
,
bits
);
}
SelectObject
(
hDC
,
hbmOrig
);
DeleteDC
(
hDC
);
...
...
dlls/winex11.drv/x11drv.h
View file @
ea1d71c7
...
...
@@ -641,6 +641,7 @@ enum x11drv_atoms
XATOM__NET_SUPPORTED
,
XATOM__NET_SYSTEM_TRAY_OPCODE
,
XATOM__NET_SYSTEM_TRAY_S0
,
XATOM__NET_WM_ICON
,
XATOM__NET_WM_MOVERESIZE
,
XATOM__NET_WM_NAME
,
XATOM__NET_WM_PID
,
...
...
dlls/winex11.drv/x11drv_main.c
View file @
ea1d71c7
...
...
@@ -138,6 +138,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"_NET_SUPPORTED"
,
"_NET_SYSTEM_TRAY_OPCODE"
,
"_NET_SYSTEM_TRAY_S0"
,
"_NET_WM_ICON"
,
"_NET_WM_MOVERESIZE"
,
"_NET_WM_NAME"
,
"_NET_WM_PID"
,
...
...
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