Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
10f38c06
Commit
10f38c06
authored
May 01, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Move user driver to unixlib.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6dd08c34
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
199 additions
and
24 deletions
+199
-24
Makefile.in
dlls/winex11.drv/Makefile.in
+2
-1
bitblt.c
dlls/winex11.drv/bitblt.c
+4
-0
brush.c
dlls/winex11.drv/brush.c
+4
-0
clipboard.c
dlls/winex11.drv/clipboard.c
+4
-0
desktop.c
dlls/winex11.drv/desktop.c
+4
-0
display.c
dlls/winex11.drv/display.c
+4
-0
dllmain.c
dlls/winex11.drv/dllmain.c
+15
-1
event.c
dlls/winex11.drv/event.c
+6
-2
graphics.c
dlls/winex11.drv/graphics.c
+4
-0
init.c
dlls/winex11.drv/init.c
+4
-0
keyboard.c
dlls/winex11.drv/keyboard.c
+4
-0
mouse.c
dlls/winex11.drv/mouse.c
+4
-0
opengl.c
dlls/winex11.drv/opengl.c
+4
-0
palette.c
dlls/winex11.drv/palette.c
+4
-0
pen.c
dlls/winex11.drv/pen.c
+4
-0
settings.c
dlls/winex11.drv/settings.c
+4
-0
systray.c
dlls/winex11.drv/systray.c
+2
-0
unixlib.h
dlls/winex11.drv/unixlib.h
+10
-1
vulkan.c
dlls/winex11.drv/vulkan.c
+4
-0
window.c
dlls/winex11.drv/window.c
+5
-1
wintab.c
dlls/winex11.drv/wintab.c
+4
-0
x11drv.h
dlls/winex11.drv/x11drv.h
+52
-12
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+25
-4
xim.c
dlls/winex11.drv/xim.c
+4
-0
xinerama.c
dlls/winex11.drv/xinerama.c
+4
-0
xrandr.c
dlls/winex11.drv/xrandr.c
+4
-0
xrender.c
dlls/winex11.drv/xrender.c
+4
-0
xvidmode.c
dlls/winex11.drv/xvidmode.c
+4
-0
winewrapper
tools/winewrapper
+2
-2
No files found.
dlls/winex11.drv/Makefile.in
View file @
10f38c06
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
winex11.drv
MODULE
=
winex11.drv
UNIXLIB
=
winex11.so
IMPORTS
=
uuid user32 gdi32 win32u
IMPORTS
=
uuid user32 gdi32 win32u
DELAYIMPORTS
=
comctl32 ole32 shell32 imm32
DELAYIMPORTS
=
comctl32 ole32 shell32 imm32
EXTRAINCL
=
$(X_CFLAGS)
EXTRAINCL
=
$(X_CFLAGS)
EXTRALIBS
=
$(X_LIBS)
$(X_EXTRA_LIBS)
$(PTHREAD_LIBS)
EXTRALIBS
=
-lwin32u
$(X_LIBS)
$(X_EXTRA_LIBS)
$(PTHREAD_LIBS)
-lm
EXTRADLLFLAGS
=
-mcygwin
EXTRADLLFLAGS
=
-mcygwin
...
...
dlls/winex11.drv/bitblt.c
View file @
10f38c06
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <assert.h>
#include <assert.h>
...
...
dlls/winex11.drv/brush.c
View file @
10f38c06
...
@@ -18,6 +18,10 @@
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <stdlib.h>
#include <stdlib.h>
...
...
dlls/winex11.drv/clipboard.c
View file @
10f38c06
...
@@ -63,6 +63,10 @@
...
@@ -63,6 +63,10 @@
* FIXME: global format list needs a critical section
* FIXME: global format list needs a critical section
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <string.h>
#include <string.h>
...
...
dlls/winex11.drv/desktop.c
View file @
10f38c06
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <X11/cursorfont.h>
#include <X11/cursorfont.h>
#include <X11/Xlib.h>
#include <X11/Xlib.h>
...
...
dlls/winex11.drv/display.c
View file @
10f38c06
...
@@ -18,6 +18,10 @@
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include "x11drv.h"
#include "x11drv.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
...
dlls/winex11.drv/dllmain.c
View file @
10f38c06
...
@@ -26,6 +26,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
...
@@ -26,6 +26,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
HMODULE
x11drv_module
=
0
;
HMODULE
x11drv_module
=
0
;
static
unixlib_handle_t
x11drv_handle
;
NTSTATUS
(
CDECL
*
x11drv_unix_call
)(
enum
x11drv_funcs
code
,
void
*
params
);
/**************************************************************************
/**************************************************************************
* wait_clipboard_mutex
* wait_clipboard_mutex
...
@@ -198,15 +200,27 @@ C_ASSERT( NtUserDriverCallbackFirst + ARRAYSIZE(kernel_callbacks) == client_func
...
@@ -198,15 +200,27 @@ C_ASSERT( NtUserDriverCallbackFirst + ARRAYSIZE(kernel_callbacks) == client_func
BOOL
WINAPI
DllMain
(
HINSTANCE
instance
,
DWORD
reason
,
void
*
reserved
)
BOOL
WINAPI
DllMain
(
HINSTANCE
instance
,
DWORD
reason
,
void
*
reserved
)
{
{
void
**
callback_table
;
void
**
callback_table
;
struct
init_params
params
=
{
NtWaitForMultipleObjects
,
foreign_window_proc
,
};
if
(
reason
!=
DLL_PROCESS_ATTACH
)
return
TRUE
;
if
(
reason
!=
DLL_PROCESS_ATTACH
)
return
TRUE
;
DisableThreadLibraryCalls
(
instance
);
DisableThreadLibraryCalls
(
instance
);
x11drv_module
=
instance
;
x11drv_module
=
instance
;
if
(
X11DRV_CALL
(
init
,
NULL
))
return
FALSE
;
if
(
NtQueryVirtualMemory
(
GetCurrentProcess
(),
instance
,
MemoryWineUnixFuncs
,
&
x11drv_handle
,
sizeof
(
x11drv_handle
),
NULL
))
return
FALSE
;
if
(
__wine_unix_call
(
x11drv_handle
,
unix_init
,
&
params
))
return
FALSE
;
callback_table
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
;
callback_table
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
;
memcpy
(
callback_table
+
NtUserDriverCallbackFirst
,
kernel_callbacks
,
sizeof
(
kernel_callbacks
)
);
memcpy
(
callback_table
+
NtUserDriverCallbackFirst
,
kernel_callbacks
,
sizeof
(
kernel_callbacks
)
);
show_systray
=
params
.
show_systray
;
x11drv_unix_call
=
params
.
unix_call
;
return
TRUE
;
return
TRUE
;
}
}
...
...
dlls/winex11.drv/event.c
View file @
10f38c06
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <poll.h>
#include <poll.h>
...
@@ -485,7 +489,7 @@ NTSTATUS X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
...
@@ -485,7 +489,7 @@ NTSTATUS X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
if
(
!
data
)
if
(
!
data
)
{
{
if
(
!
count
&&
timeout
&&
!
timeout
->
QuadPart
)
return
WAIT_TIMEOUT
;
if
(
!
count
&&
timeout
&&
!
timeout
->
QuadPart
)
return
WAIT_TIMEOUT
;
return
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
return
p
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
}
}
...
@@ -494,7 +498,7 @@ NTSTATUS X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
...
@@ -494,7 +498,7 @@ NTSTATUS X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
if
(
process_events
(
data
->
display
,
filter_event
,
mask
))
ret
=
count
-
1
;
if
(
process_events
(
data
->
display
,
filter_event
,
mask
))
ret
=
count
-
1
;
else
if
(
count
||
!
timeout
||
timeout
->
QuadPart
)
else
if
(
count
||
!
timeout
||
timeout
->
QuadPart
)
{
{
ret
=
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
ret
=
p
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
if
(
ret
==
count
-
1
)
process_events
(
data
->
display
,
filter_event
,
mask
);
if
(
ret
==
count
-
1
)
process_events
(
data
->
display
,
filter_event
,
mask
);
}
}
...
...
dlls/winex11.drv/graphics.c
View file @
10f38c06
...
@@ -24,6 +24,10 @@
...
@@ -24,6 +24,10 @@
* graphics mode
* graphics mode
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <stdarg.h>
#include <stdarg.h>
...
...
dlls/winex11.drv/init.c
View file @
10f38c06
...
@@ -18,6 +18,10 @@
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <stdarg.h>
#include <stdarg.h>
...
...
dlls/winex11.drv/keyboard.c
View file @
10f38c06
...
@@ -23,6 +23,10 @@
...
@@ -23,6 +23,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <X11/Xatom.h>
#include <X11/Xatom.h>
...
...
dlls/winex11.drv/mouse.c
View file @
10f38c06
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <math.h>
#include <math.h>
...
...
dlls/winex11.drv/opengl.c
View file @
10f38c06
...
@@ -23,6 +23,10 @@
...
@@ -23,6 +23,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <assert.h>
#include <assert.h>
...
...
dlls/winex11.drv/palette.c
View file @
10f38c06
...
@@ -18,6 +18,10 @@
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <stdarg.h>
#include <stdarg.h>
...
...
dlls/winex11.drv/pen.c
View file @
10f38c06
...
@@ -18,6 +18,10 @@
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include "x11drv.h"
#include "x11drv.h"
...
...
dlls/winex11.drv/settings.c
View file @
10f38c06
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <stdlib.h>
#include <stdlib.h>
...
...
dlls/winex11.drv/systray.c
View file @
10f38c06
...
@@ -44,6 +44,8 @@
...
@@ -44,6 +44,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
systray
);
WINE_DEFAULT_DEBUG_CHANNEL
(
systray
);
BOOL
show_systray
=
TRUE
;
/* an individual systray icon */
/* an individual systray icon */
struct
tray_icon
struct
tray_icon
{
{
...
...
dlls/winex11.drv/unixlib.h
View file @
10f38c06
...
@@ -38,7 +38,7 @@ enum x11drv_funcs
...
@@ -38,7 +38,7 @@ enum x11drv_funcs
};
};
/* FIXME: Use __wine_unix_call when the rest of the stack is ready */
/* FIXME: Use __wine_unix_call when the rest of the stack is ready */
extern
NTSTATUS
x11drv_unix_call
(
enum
x11drv_funcs
code
,
void
*
params
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
(
CDECL
*
x11drv_unix_call
)
(
enum
x11drv_funcs
code
,
void
*
params
)
DECLSPEC_HIDDEN
;
#define X11DRV_CALL(func, params) x11drv_unix_call( unix_ ## func, params )
#define X11DRV_CALL(func, params) x11drv_unix_call( unix_ ## func, params )
/* x11drv_clipboard_message params */
/* x11drv_clipboard_message params */
...
@@ -57,6 +57,15 @@ struct create_desktop_params
...
@@ -57,6 +57,15 @@ struct create_desktop_params
UINT
height
;
UINT
height
;
};
};
/* x11drv_init params */
struct
init_params
{
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
WNDPROC
foreign_window_proc
;
BOOL
show_systray
;
NTSTATUS
(
CDECL
*
unix_call
)(
enum
x11drv_funcs
code
,
void
*
params
);
};
struct
systray_dock_params
struct
systray_dock_params
{
{
UINT64
event_handle
;
UINT64
event_handle
;
...
...
dlls/winex11.drv/vulkan.c
View file @
10f38c06
...
@@ -20,6 +20,10 @@
...
@@ -20,6 +20,10 @@
/* NOTE: If making changes here, consider whether they should be reflected in
/* NOTE: If making changes here, consider whether they should be reflected in
* the other drivers. */
* the other drivers. */
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <stdarg.h>
#include <stdarg.h>
...
...
dlls/winex11.drv/window.c
View file @
10f38c06
...
@@ -20,6 +20,10 @@
...
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <stdarg.h>
#include <stdarg.h>
...
@@ -2016,7 +2020,7 @@ HWND create_foreign_window( Display *display, Window xwin )
...
@@ -2016,7 +2020,7 @@ HWND create_foreign_window( Display *display, Window xwin )
memset
(
&
class
,
0
,
sizeof
(
class
)
);
memset
(
&
class
,
0
,
sizeof
(
class
)
);
class
.
cbSize
=
sizeof
(
class
);
class
.
cbSize
=
sizeof
(
class
);
class
.
lpfnWndProc
=
foreign_window_proc
;
class
.
lpfnWndProc
=
client_
foreign_window_proc
;
class
.
lpszClassName
=
classW
;
class
.
lpszClassName
=
classW
;
RtlInitUnicodeString
(
&
class_name
,
classW
);
RtlInitUnicodeString
(
&
class_name
,
classW
);
if
(
!
NtUserRegisterClassExWOW
(
&
class
,
&
class_name
,
&
version
,
NULL
,
0
,
0
,
NULL
)
&&
if
(
!
NtUserRegisterClassExWOW
(
&
class
,
&
class_name
,
&
version
,
NULL
,
0
,
0
,
NULL
)
&&
...
...
dlls/winex11.drv/wintab.c
View file @
10f38c06
...
@@ -18,6 +18,10 @@
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <stdlib.h>
#include <stdlib.h>
...
...
dlls/winex11.drv/x11drv.h
View file @
10f38c06
...
@@ -62,8 +62,8 @@ typedef int Status;
...
@@ -62,8 +62,8 @@ typedef int Status;
#include "ntgdi.h"
#include "ntgdi.h"
#include "wine/gdi_driver.h"
#include "wine/gdi_driver.h"
#include "unixlib.h"
#include "unixlib.h"
#include "winnls.h"
#include "wine/list.h"
#include "wine/list.h"
#include "wine/unicode.h"
#define MAX_DASHLEN 16
#define MAX_DASHLEN 16
...
@@ -438,6 +438,10 @@ extern int xrender_error_base DECLSPEC_HIDDEN;
...
@@ -438,6 +438,10 @@ extern int xrender_error_base DECLSPEC_HIDDEN;
extern
HMODULE
x11drv_module
DECLSPEC_HIDDEN
;
extern
HMODULE
x11drv_module
DECLSPEC_HIDDEN
;
extern
char
*
process_name
DECLSPEC_HIDDEN
;
extern
char
*
process_name
DECLSPEC_HIDDEN
;
extern
Display
*
clipboard_display
DECLSPEC_HIDDEN
;
extern
Display
*
clipboard_display
DECLSPEC_HIDDEN
;
extern
WNDPROC
client_foreign_window_proc
;
extern
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
)
DECLSPEC_HIDDEN
;
/* atoms */
/* atoms */
...
@@ -937,18 +941,54 @@ static inline UINT asciiz_to_unicode( WCHAR *dst, const char *src )
...
@@ -937,18 +941,54 @@ static inline UINT asciiz_to_unicode( WCHAR *dst, const char *src )
return
(
p
-
dst
)
*
sizeof
(
WCHAR
);
return
(
p
-
dst
)
*
sizeof
(
WCHAR
);
}
}
/* FIXME: remove once we may use ntdll.so version */
static
inline
LONG
x11drv_wcstol
(
LPCWSTR
s
,
LPWSTR
*
end
,
INT
base
)
{
static
inline
DWORD
ntdll_umbstowcs
(
const
char
*
src
,
DWORD
srclen
,
WCHAR
*
dst
,
DWORD
dstlen
)
BOOL
negative
=
FALSE
,
empty
=
TRUE
;
{
LONG
ret
=
0
;
return
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
src
,
srclen
,
dst
,
dstlen
);
}
if
(
base
<
0
||
base
==
1
||
base
>
36
)
return
0
;
if
(
end
)
*
end
=
(
WCHAR
*
)
s
;
static
inline
int
ntdll_wcstoumbs
(
const
WCHAR
*
src
,
DWORD
srclen
,
char
*
dst
,
DWORD
dstlen
,
BOOL
strict
)
while
(
*
s
==
' '
||
*
s
==
'\t'
)
s
++
;
{
return
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
src
,
srclen
,
dst
,
dstlen
,
NULL
,
NULL
);
if
(
*
s
==
'-'
)
{
negative
=
TRUE
;
s
++
;
}
else
if
(
*
s
==
'+'
)
s
++
;
if
((
base
==
0
||
base
==
16
)
&&
s
[
0
]
==
'0'
&&
(
s
[
1
]
==
'x'
||
s
[
1
]
==
'X'
))
{
base
=
16
;
s
+=
2
;
}
if
(
base
==
0
)
base
=
s
[
0
]
!=
'0'
?
10
:
8
;
while
(
*
s
)
{
int
v
;
if
(
'0'
<=
*
s
&&
*
s
<=
'9'
)
v
=
*
s
-
'0'
;
else
if
(
'A'
<=
*
s
&&
*
s
<=
'Z'
)
v
=
*
s
-
'A'
+
10
;
else
if
(
'a'
<=
*
s
&&
*
s
<=
'z'
)
v
=
*
s
-
'a'
+
10
;
else
break
;
if
(
v
>=
base
)
break
;
if
(
negative
)
v
=
-
v
;
s
++
;
empty
=
FALSE
;
if
(
!
negative
&&
(
ret
>
MAXLONG
/
base
||
ret
*
base
>
MAXLONG
-
v
))
ret
=
MAXLONG
;
else
if
(
negative
&&
(
ret
<
(
LONG
)
MINLONG
/
base
||
ret
*
base
<
(
LONG
)(
MINLONG
-
v
)))
ret
=
MINLONG
;
else
ret
=
ret
*
base
+
v
;
}
if
(
end
&&
!
empty
)
*
end
=
(
WCHAR
*
)
s
;
return
ret
;
}
}
#define
wcsicmp lstrcmpiW
#define
strtolW x11drv_wcstol
#endif
/* __WINE_X11DRV_H */
#endif
/* __WINE_X11DRV_H */
dlls/winex11.drv/x11drv_main.c
View file @
10f38c06
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <fcntl.h>
#include <fcntl.h>
...
@@ -84,6 +88,7 @@ int copy_default_colors = 128;
...
@@ -84,6 +88,7 @@ int copy_default_colors = 128;
int
alloc_system_colors
=
256
;
int
alloc_system_colors
=
256
;
int
xrender_error_base
=
0
;
int
xrender_error_base
=
0
;
char
*
process_name
=
NULL
;
char
*
process_name
=
NULL
;
WNDPROC
client_foreign_window_proc
=
NULL
;
static
x11drv_error_callback
err_callback
;
/* current callback for error */
static
x11drv_error_callback
err_callback
;
/* current callback for error */
static
Display
*
err_callback_display
;
/* display callback is set for */
static
Display
*
err_callback_display
;
/* display callback is set for */
...
@@ -204,6 +209,16 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
...
@@ -204,6 +209,16 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"text/uri-list"
"text/uri-list"
};
};
/* We use use pointer to call NtWaitForMultipleObjects to make it go through
* syscall dispatcher. We need that because win32u bypasses syscall thunks and
* if we called NtWaitForMultipleObjects directly, it wouldn't be able to handle
* user APCs. This will be removed as soon as we may use syscall interface
* for NtUserMsgWaitForMultipleObjectsEx. */
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
static
NTSTATUS
CDECL
unix_call
(
enum
x11drv_funcs
code
,
void
*
params
);
/***********************************************************************
/***********************************************************************
* ignore_error
* ignore_error
*
*
...
@@ -636,6 +651,7 @@ static void init_visuals( Display *display, int screen )
...
@@ -636,6 +651,7 @@ static void init_visuals( Display *display, int screen )
*/
*/
static
NTSTATUS
x11drv_init
(
void
*
arg
)
static
NTSTATUS
x11drv_init
(
void
*
arg
)
{
{
struct
init_params
*
params
=
arg
;
Display
*
display
;
Display
*
display
;
void
*
libx11
=
dlopen
(
SONAME_LIBX11
,
RTLD_NOW
|
RTLD_GLOBAL
);
void
*
libx11
=
dlopen
(
SONAME_LIBX11
,
RTLD_NOW
|
RTLD_GLOBAL
);
...
@@ -657,6 +673,9 @@ static NTSTATUS x11drv_init( void *arg )
...
@@ -657,6 +673,9 @@ static NTSTATUS x11drv_init( void *arg )
if
(
!
XInitThreads
())
ERR
(
"XInitThreads failed, trouble ahead
\n
"
);
if
(
!
XInitThreads
())
ERR
(
"XInitThreads failed, trouble ahead
\n
"
);
if
(
!
(
display
=
XOpenDisplay
(
NULL
)))
return
STATUS_UNSUCCESSFUL
;
if
(
!
(
display
=
XOpenDisplay
(
NULL
)))
return
STATUS_UNSUCCESSFUL
;
pNtWaitForMultipleObjects
=
params
->
pNtWaitForMultipleObjects
;
client_foreign_window_proc
=
params
->
foreign_window_proc
;
fcntl
(
ConnectionNumber
(
display
),
F_SETFD
,
1
);
/* set close on exec flag */
fcntl
(
ConnectionNumber
(
display
),
F_SETFD
,
1
);
/* set close on exec flag */
root_window
=
DefaultRootWindow
(
display
);
root_window
=
DefaultRootWindow
(
display
);
gdi_display
=
display
;
gdi_display
=
display
;
...
@@ -693,6 +712,8 @@ static NTSTATUS x11drv_init( void *arg )
...
@@ -693,6 +712,8 @@ static NTSTATUS x11drv_init( void *arg )
init_user_driver
();
init_user_driver
();
X11DRV_DisplayDevices_Init
(
FALSE
);
X11DRV_DisplayDevices_Init
(
FALSE
);
params
->
show_systray
=
show_systray
;
params
->
unix_call
=
unix_call
;
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
...
@@ -960,9 +981,9 @@ NTSTATUS CDECL X11DRV_D3DKMTCheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDP
...
@@ -960,9 +981,9 @@ NTSTATUS CDECL X11DRV_D3DKMTCheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDP
NTSTATUS
x11drv_client_func
(
enum
x11drv_client_funcs
id
,
const
void
*
params
,
ULONG
size
)
NTSTATUS
x11drv_client_func
(
enum
x11drv_client_funcs
id
,
const
void
*
params
,
ULONG
size
)
{
{
/* FIXME: use KeUserModeCallback instead */
void
*
ret_ptr
;
NTSTATUS
(
WINAPI
*
func
)(
const
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
]
;
ULONG
ret_len
;
return
func
(
params
,
size
);
return
KeUserModeCallback
(
id
,
params
,
size
,
&
ret_ptr
,
&
ret_len
);
}
}
...
@@ -995,7 +1016,7 @@ C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count );
...
@@ -995,7 +1016,7 @@ C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count );
/* FIXME: Use __wine_unix_call instead */
/* FIXME: Use __wine_unix_call instead */
NTSTATUS
x11drv_
unix_call
(
enum
x11drv_funcs
code
,
void
*
params
)
static
NTSTATUS
CDECL
unix_call
(
enum
x11drv_funcs
code
,
void
*
params
)
{
{
return
__wine_unix_call_funcs
[
code
](
params
);
return
__wine_unix_call_funcs
[
code
](
params
);
}
}
dlls/winex11.drv/xim.c
View file @
10f38c06
...
@@ -18,6 +18,10 @@
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
...
...
dlls/winex11.drv/xinerama.c
View file @
10f38c06
...
@@ -18,6 +18,10 @@
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <stdarg.h>
#include <stdarg.h>
...
...
dlls/winex11.drv/xrandr.c
View file @
10f38c06
...
@@ -20,6 +20,10 @@
...
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#define NONAMELESSSTRUCT
#define NONAMELESSSTRUCT
...
...
dlls/winex11.drv/xrender.c
View file @
10f38c06
...
@@ -23,6 +23,10 @@
...
@@ -23,6 +23,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <assert.h>
#include <assert.h>
...
...
dlls/winex11.drv/xvidmode.c
View file @
10f38c06
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "config.h"
#include <assert.h>
#include <assert.h>
...
...
tools/winewrapper
View file @
10f38c06
...
@@ -69,9 +69,9 @@ if [ "`uname -s`" = "Darwin" ]
...
@@ -69,9 +69,9 @@ if [ "`uname -s`" = "Darwin" ]
then
then
if
[
-n
"
$DYLD_LIBRARY_PATH
"
]
if
[
-n
"
$DYLD_LIBRARY_PATH
"
]
then
then
DYLD_LIBRARY_PATH
=
"
$topdir
/libs/wine:
$topdir
/dlls/ntdll:
$DYLD_LIBRARY_PATH
"
DYLD_LIBRARY_PATH
=
"
$topdir
/libs/wine:
$topdir
/dlls/ntdll:
$
topdir
/dlls/win32u:
$
DYLD_LIBRARY_PATH
"
else
else
DYLD_LIBRARY_PATH
=
"
$topdir
/libs/wine:
$topdir
/dlls/ntdll"
DYLD_LIBRARY_PATH
=
"
$topdir
/libs/wine:
$topdir
/dlls/ntdll
:
$topdir
/dlls/win32u
"
fi
fi
export
DYLD_LIBRARY_PATH
export
DYLD_LIBRARY_PATH
else
else
...
...
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