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
af50ad67
Commit
af50ad67
authored
Jul 07, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved most initializations out of the create_desktop function and into
process_attach.
parent
204596f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
71 deletions
+68
-71
window.c
dlls/x11drv/window.c
+14
-71
x11drv_main.c
dlls/x11drv/x11drv_main.c
+54
-0
No files found.
dlls/x11drv/window.c
View file @
af50ad67
...
...
@@ -54,60 +54,10 @@ XContext winContext = 0;
/* X context to associate a struct x11drv_win_data to an hwnd */
static
XContext
win_data_context
;
Atom
X11DRV_Atoms
[
NB_XATOMS
-
FIRST_XATOM
];
static
const
char
*
const
atom_names
[
NB_XATOMS
-
FIRST_XATOM
]
=
{
"CLIPBOARD"
,
"COMPOUND_TEXT"
,
"MULTIPLE"
,
"SELECTION_DATA"
,
"TARGETS"
,
"TEXT"
,
"UTF8_STRING"
,
"RAW_ASCENT"
,
"RAW_DESCENT"
,
"RAW_CAP_HEIGHT"
,
"WM_PROTOCOLS"
,
"WM_DELETE_WINDOW"
,
"WM_TAKE_FOCUS"
,
"KWM_DOCKWINDOW"
,
"DndProtocol"
,
"DndSelection"
,
"_MOTIF_WM_HINTS"
,
"_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR"
,
"_NET_WM_MOVERESIZE"
,
"_NET_WM_PID"
,
"_NET_WM_PING"
,
"_NET_WM_NAME"
,
"_NET_WM_WINDOW_TYPE"
,
"_NET_WM_WINDOW_TYPE_UTILITY"
,
"XdndAware"
,
"XdndEnter"
,
"XdndPosition"
,
"XdndStatus"
,
"XdndLeave"
,
"XdndFinished"
,
"XdndDrop"
,
"XdndActionCopy"
,
"XdndActionMove"
,
"XdndActionLink"
,
"XdndActionAsk"
,
"XdndActionPrivate"
,
"XdndSelection"
,
"XdndTarget"
,
"XdndTypeList"
,
"WCF_DIB"
,
"image/gif"
,
"text/html"
,
"text/plain"
,
"text/rtf"
,
"text/richtext"
};
static
LPCSTR
whole_window_atom
;
static
LPCSTR
icon_window_atom
;
static
LPCSTR
managed_atom
;
static
const
char
whole_window_prop
[]
=
"__wine_x11_whole_window"
;
static
const
char
icon_window_prop
[]
=
"__wine_x11_icon_window"
;
static
const
char
managed_prop
[]
=
"__wine_x11_managed"
;
static
const
char
visual_id_prop
[]
=
"__wine_x11_visual_id"
;
/***********************************************************************
* is_window_managed
...
...
@@ -174,7 +124,7 @@ static int get_window_attributes( struct x11drv_win_data *data, XSetWindowAttrib
if
(
!
data
->
managed
&&
!
using_wine_desktop
&&
is_window_managed
(
data
->
hwnd
))
{
data
->
managed
=
TRUE
;
SetPropA
(
data
->
hwnd
,
managed_
atom
,
(
HANDLE
)
1
);
SetPropA
(
data
->
hwnd
,
managed_
prop
,
(
HANDLE
)
1
);
}
attr
->
override_redirect
=
!
data
->
managed
;
attr
->
colormap
=
X11DRV_PALETTE_PaletteXColormap
;
...
...
@@ -262,7 +212,7 @@ static Window create_icon_window( Display *display, struct x11drv_win_data *data
wine_tsx11_unlock
();
TRACE
(
"created %lx
\n
"
,
data
->
icon_window
);
SetPropA
(
data
->
hwnd
,
icon_window_
atom
,
(
HANDLE
)
data
->
icon_window
);
SetPropA
(
data
->
hwnd
,
icon_window_
prop
,
(
HANDLE
)
data
->
icon_window
);
return
data
->
icon_window
;
}
...
...
@@ -281,7 +231,7 @@ static void destroy_icon_window( Display *display, struct x11drv_win_data *data
XDestroyWindow
(
display
,
data
->
icon_window
);
data
->
icon_window
=
0
;
wine_tsx11_unlock
();
RemovePropA
(
data
->
hwnd
,
icon_window_
atom
);
RemovePropA
(
data
->
hwnd
,
icon_window_
prop
);
}
...
...
@@ -698,22 +648,14 @@ static void create_desktop( Display *display, struct x11drv_win_data *data )
VisualID
visualid
;
wine_tsx11_lock
();
winContext
=
XUniqueContext
();
XInternAtoms
(
display
,
(
char
**
)
atom_names
,
NB_XATOMS
-
FIRST_XATOM
,
False
,
X11DRV_Atoms
);
visualid
=
XVisualIDFromVisual
(
visual
);
wine_tsx11_unlock
();
whole_window_atom
=
MAKEINTATOMA
(
GlobalAddAtomA
(
"__wine_x11_whole_window"
));
icon_window_atom
=
MAKEINTATOMA
(
GlobalAddAtomA
(
"__wine_x11_icon_window"
));
managed_atom
=
MAKEINTATOMA
(
GlobalAddAtomA
(
"__wine_x11_managed"
));
data
->
whole_window
=
root_window
;
data
->
whole_rect
=
data
->
client_rect
=
data
->
window_rect
;
SetPropA
(
data
->
hwnd
,
whole_window_atom
,
(
HANDLE
)
root_window
);
SetPropA
(
data
->
hwnd
,
"__wine_x11_visual_id"
,
(
HANDLE
)
visualid
);
X11DRV_InitClipboard
();
SetPropA
(
data
->
hwnd
,
whole_window_prop
,
(
HANDLE
)
root_window
);
SetPropA
(
data
->
hwnd
,
visual_id_prop
,
(
HANDLE
)
visualid
);
if
(
root_window
!=
DefaultRootWindow
(
display
))
X11DRV_create_desktop_thread
();
}
...
...
@@ -775,7 +717,7 @@ static Window create_whole_window( Display *display, struct x11drv_win_data *dat
X11DRV_set_wm_hints
(
display
,
data
);
SetPropA
(
data
->
hwnd
,
whole_window_
atom
,
(
HANDLE
)
data
->
whole_window
);
SetPropA
(
data
->
hwnd
,
whole_window_
prop
,
(
HANDLE
)
data
->
whole_window
);
return
data
->
whole_window
;
}
...
...
@@ -804,7 +746,7 @@ static void destroy_whole_window( Display *display, struct x11drv_win_data *data
XDestroyIC
(
data
->
xic
);
}
wine_tsx11_unlock
();
RemovePropA
(
data
->
hwnd
,
whole_window_
atom
);
RemovePropA
(
data
->
hwnd
,
whole_window_
prop
);
}
...
...
@@ -937,6 +879,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
data
->
hWMIconMask
=
0
;
wine_tsx11_lock
();
if
(
!
winContext
)
winContext
=
XUniqueContext
();
if
(
!
win_data_context
)
win_data_context
=
XUniqueContext
();
XSaveContext
(
display
,
(
XID
)
hwnd
,
win_data_context
,
(
char
*
)
data
);
wine_tsx11_unlock
();
...
...
@@ -1108,7 +1051,7 @@ Window X11DRV_get_whole_window( HWND hwnd )
{
struct
x11drv_win_data
*
data
=
X11DRV_get_win_data
(
hwnd
);
if
(
!
data
)
return
(
Window
)
GetPropA
(
hwnd
,
whole_window_
atom
);
if
(
!
data
)
return
(
Window
)
GetPropA
(
hwnd
,
whole_window_
prop
);
return
data
->
whole_window
;
}
...
...
@@ -1175,7 +1118,7 @@ HWND X11DRV_SetParent( HWND hwnd, HWND parent )
if
(
data
->
managed
)
{
data
->
managed
=
FALSE
;
RemovePropA
(
data
->
hwnd
,
managed_
atom
);
RemovePropA
(
data
->
hwnd
,
managed_
prop
);
}
}
}
...
...
dlls/x11drv/x11drv_main.c
View file @
af50ad67
...
...
@@ -105,6 +105,57 @@ static char input_style[20];
#define IS_OPTION_FALSE(ch) \
((ch) == 'n' || (ch) == 'N' || (ch) == 'f' || (ch) == 'F' || (ch) == '0')
Atom
X11DRV_Atoms
[
NB_XATOMS
-
FIRST_XATOM
];
static
const
char
*
const
atom_names
[
NB_XATOMS
-
FIRST_XATOM
]
=
{
"CLIPBOARD"
,
"COMPOUND_TEXT"
,
"MULTIPLE"
,
"SELECTION_DATA"
,
"TARGETS"
,
"TEXT"
,
"UTF8_STRING"
,
"RAW_ASCENT"
,
"RAW_DESCENT"
,
"RAW_CAP_HEIGHT"
,
"WM_PROTOCOLS"
,
"WM_DELETE_WINDOW"
,
"WM_TAKE_FOCUS"
,
"KWM_DOCKWINDOW"
,
"DndProtocol"
,
"DndSelection"
,
"_MOTIF_WM_HINTS"
,
"_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR"
,
"_NET_WM_MOVERESIZE"
,
"_NET_WM_PID"
,
"_NET_WM_PING"
,
"_NET_WM_NAME"
,
"_NET_WM_WINDOW_TYPE"
,
"_NET_WM_WINDOW_TYPE_UTILITY"
,
"XdndAware"
,
"XdndEnter"
,
"XdndPosition"
,
"XdndStatus"
,
"XdndLeave"
,
"XdndFinished"
,
"XdndDrop"
,
"XdndActionCopy"
,
"XdndActionMove"
,
"XdndActionLink"
,
"XdndActionAsk"
,
"XdndActionPrivate"
,
"XdndSelection"
,
"XdndTarget"
,
"XdndTypeList"
,
"WCF_DIB"
,
"image/gif"
,
"text/html"
,
"text/plain"
,
"text/rtf"
,
"text/richtext"
};
/***********************************************************************
* ignore_error
*
...
...
@@ -364,6 +415,8 @@ static BOOL process_attach(void)
screen_depth
=
desktop_vi
->
depth
;
}
XInternAtoms
(
display
,
(
char
**
)
atom_names
,
NB_XATOMS
-
FIRST_XATOM
,
False
,
X11DRV_Atoms
);
if
(
synchronous
)
XSynchronize
(
display
,
True
);
screen_width
=
WidthOfScreen
(
screen
);
...
...
@@ -391,6 +444,7 @@ static BOOL process_attach(void)
#endif
X11DRV_InitKeyboard
();
X11DRV_InitClipboard
();
return
TRUE
;
}
...
...
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