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
64dc6561
Commit
64dc6561
authored
Sep 04, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Remove support for icon windows, use a default icon instead.
parent
a39659fc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
68 deletions
+6
-68
window.c
dlls/winex11.drv/window.c
+6
-67
x11drv.h
dlls/winex11.drv/x11drv.h
+0
-1
No files found.
dlls/winex11.drv/window.c
View file @
64dc6561
...
...
@@ -82,7 +82,6 @@ static Window user_time_window;
static
const
char
foreign_window_prop
[]
=
"__wine_x11_foreign_window"
;
static
const
char
whole_window_prop
[]
=
"__wine_x11_whole_window"
;
static
const
char
icon_window_prop
[]
=
"__wine_x11_icon_window"
;
static
const
char
clip_window_prop
[]
=
"__wine_x11_clip_window"
;
static
const
char
managed_prop
[]
=
"__wine_x11_managed"
;
...
...
@@ -449,48 +448,6 @@ static void sync_window_text( Display *display, Window win, const WCHAR *text )
/***********************************************************************
* create_icon_window
*/
static
Window
create_icon_window
(
Display
*
display
,
struct
x11drv_win_data
*
data
)
{
XSetWindowAttributes
attr
;
attr
.
event_mask
=
(
ExposureMask
|
KeyPressMask
|
KeyReleaseMask
|
PointerMotionMask
|
ButtonPressMask
|
ButtonReleaseMask
|
EnterWindowMask
);
attr
.
bit_gravity
=
NorthWestGravity
;
attr
.
backing_store
=
NotUseful
/*WhenMapped*/
;
attr
.
colormap
=
X11DRV_PALETTE_PaletteXColormap
;
/* Needed due to our visual */
data
->
icon_window
=
XCreateWindow
(
display
,
root_window
,
0
,
0
,
GetSystemMetrics
(
SM_CXICON
),
GetSystemMetrics
(
SM_CYICON
),
0
,
screen_depth
,
InputOutput
,
visual
,
CWEventMask
|
CWBitGravity
|
CWBackingStore
|
CWColormap
,
&
attr
);
XSaveContext
(
display
,
data
->
icon_window
,
winContext
,
(
char
*
)
data
->
hwnd
);
XFlush
(
display
);
/* make sure the window exists before we start painting to it */
TRACE
(
"created %lx
\n
"
,
data
->
icon_window
);
SetPropA
(
data
->
hwnd
,
icon_window_prop
,
(
HANDLE
)
data
->
icon_window
);
return
data
->
icon_window
;
}
/***********************************************************************
* destroy_icon_window
*/
static
void
destroy_icon_window
(
Display
*
display
,
struct
x11drv_win_data
*
data
)
{
if
(
!
data
->
icon_window
)
return
;
XDeleteContext
(
display
,
data
->
icon_window
,
winContext
);
XDestroyWindow
(
display
,
data
->
icon_window
);
data
->
icon_window
=
0
;
RemovePropA
(
data
->
hwnd
,
icon_window_prop
);
}
/***********************************************************************
* get_bitmap_argb
*
* Return the bitmap bits in ARGB format. Helper for setting icon hints.
...
...
@@ -624,11 +581,16 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data,
HICON
icon_big
,
HICON
icon_small
)
{
XWMHints
*
hints
=
data
->
wm_hints
;
ICONINFO
ii
,
ii_small
;
HDC
hDC
;
unsigned
int
size
;
unsigned
long
*
bits
;
if
(
!
icon_big
)
{
icon_big
=
(
HICON
)
SendMessageW
(
data
->
hwnd
,
WM_GETICON
,
ICON_BIG
,
0
);
if
(
!
icon_big
)
icon_big
=
(
HICON
)
GetClassLongPtrW
(
data
->
hwnd
,
GCLP_HICON
);
if
(
!
icon_big
)
icon_big
=
LoadIconW
(
0
,
(
LPWSTR
)
IDI_WINLOGO
);
}
if
(
!
icon_small
)
{
...
...
@@ -640,19 +602,6 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data,
if
(
data
->
icon_mask
)
XFreePixmap
(
gdi_display
,
data
->
icon_mask
);
data
->
icon_pixmap
=
data
->
icon_mask
=
0
;
if
(
!
icon_big
)
{
if
(
!
data
->
icon_window
)
create_icon_window
(
display
,
data
);
hints
->
icon_window
=
data
->
icon_window
;
hints
->
flags
=
(
hints
->
flags
&
~
(
IconPixmapHint
|
IconMaskHint
))
|
IconWindowHint
;
}
else
{
ICONINFO
ii
,
ii_small
;
HDC
hDC
;
unsigned
int
size
;
unsigned
long
*
bits
;
if
(
!
GetIconInfo
(
icon_big
,
&
ii
))
return
;
hDC
=
CreateCompatibleDC
(
0
);
...
...
@@ -690,13 +639,9 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data,
hints
->
icon_mask
=
data
->
icon_mask
;
hints
->
flags
|=
IconPixmapHint
|
IconMaskHint
;
}
destroy_icon_window
(
display
,
data
);
hints
->
flags
&=
~
IconWindowHint
;
DeleteObject
(
ii
.
hbmColor
);
DeleteObject
(
ii
.
hbmMask
);
DeleteDC
(
hDC
);
}
}
...
...
@@ -1518,7 +1463,6 @@ void CDECL X11DRV_DestroyWindow( HWND hwnd )
destroy_gl_drawable
(
hwnd
);
destroy_whole_window
(
thread_data
->
display
,
data
,
FALSE
);
destroy_icon_window
(
thread_data
->
display
,
data
);
if
(
thread_data
->
last_focus
==
hwnd
)
thread_data
->
last_focus
=
0
;
if
(
thread_data
->
last_xic_hwnd
==
hwnd
)
thread_data
->
last_xic_hwnd
=
0
;
...
...
@@ -1864,11 +1808,7 @@ void CDECL X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect,
if
(
top
==
hwnd
)
{
if
(
data
&&
IsIconic
(
hwnd
)
&&
data
->
icon_window
)
{
escape
.
drawable
=
data
->
icon_window
;
}
else
escape
.
drawable
=
data
?
data
->
whole_window
:
X11DRV_get_whole_window
(
hwnd
);
escape
.
drawable
=
data
?
data
->
whole_window
:
X11DRV_get_whole_window
(
hwnd
);
/* special case: when repainting the root window, clip out top-level windows */
if
(
data
&&
data
->
whole_window
==
root_window
)
escape
.
mode
=
ClipByChildren
;
...
...
@@ -1962,7 +1902,6 @@ void CDECL X11DRV_SetParent( HWND hwnd, HWND parent, HWND old_parent )
{
/* destroy the old X windows */
destroy_whole_window
(
display
,
data
,
FALSE
);
destroy_icon_window
(
display
,
data
);
if
(
data
->
managed
)
{
data
->
managed
=
FALSE
;
...
...
dlls/winex11.drv/x11drv.h
View file @
64dc6561
...
...
@@ -533,7 +533,6 @@ struct x11drv_win_data
{
HWND
hwnd
;
/* hwnd that this private data belongs to */
Window
whole_window
;
/* X window for the complete window */
Window
icon_window
;
/* X window for the icon */
RECT
window_rect
;
/* USER window rectangle relative to parent */
RECT
whole_rect
;
/* X window rectangle for the whole window relative to parent */
RECT
client_rect
;
/* client area relative to parent */
...
...
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