Skip to content

Commit

Permalink
Wine Staging 4e2dc89, wine-tkg-git e13464c.
Browse files Browse the repository at this point in the history
  • Loading branch information
openglfreak committed Apr 2, 2021
1 parent 678b42f commit 4afe0f2
Show file tree
Hide file tree
Showing 63 changed files with 3,282 additions and 1,085 deletions.
4 changes: 2 additions & 2 deletions ps0001-p0038-make_req.mypatch
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ index 18551a2d448..90afd91e7ba 100644

/* ### protocol_version begin ### */

-#define SERVER_PROTOCOL_VERSION 688
+#define SERVER_PROTOCOL_VERSION 689
-#define SERVER_PROTOCOL_VERSION 689
+#define SERVER_PROTOCOL_VERSION 690

/* ### protocol_version end ### */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ index 451bc3014d4..65f40e6cd6d 100644
{
char mem[100];
@@ -4605,4 +4632,5 @@ START_TEST(string)
test___STRINGTOLD();
test_SpecialCasing();
test__mbbtype();
test_wcsncpy();
+ test_iswctype();
}
diff --git a/dlls/ucrtbase/tests/misc.c b/dlls/ucrtbase/tests/misc.c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ index a0acbf9deb7..de9fdcf0347 100644

/* ### protocol_version begin ### */

-#define SERVER_PROTOCOL_VERSION 689
+#define SERVER_PROTOCOL_VERSION 690
-#define SERVER_PROTOCOL_VERSION 690
+#define SERVER_PROTOCOL_VERSION 691

/* ### protocol_version end ### */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ index 37c095df345..db6f9f3ca7c 100644
}
#endif

+static const BOOL is_win64 = sizeof(void *) == 8;
+static const BOOL is_win64 = sizeof(void *) > sizeof(int);
+
#ifdef __i386__

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ index c2285aef6fc..7e3261b8c84 100644
--- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c
@@ -30,6 +30,7 @@
#include "winsock2.h"
#include "wine/test.h"
#include "wine/heap.h"
#include "wine/mssign.h"
+#include "ddk/wdm.h"

#include "driver.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ index 53661f6c788..7c8d63de5b3 100644
@@ -4407,6 +4407,7 @@ WORD WINAPI SYSTEM_KillSystemTimer( WORD );

#ifdef __WINESRC__
WINUSERAPI BOOL CDECL __wine_send_input( HWND hwnd, const INPUT *input, UINT flags );
WINUSERAPI BOOL CDECL __wine_send_input( HWND hwnd, const INPUT *input );
+WINUSERAPI BOOL CDECL __wine_set_foreground_window( HWND hwnd, DWORD time );
#endif

Expand Down
2 changes: 1 addition & 1 deletion ps0157-p0025-wip-faster-rebuilds.mypatch
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ index 7c8d63de5b3..53661f6c788 100644
@@ -4407,7 +4407,6 @@ WORD WINAPI SYSTEM_KillSystemTimer( WORD );

#ifdef __WINESRC__
WINUSERAPI BOOL CDECL __wine_send_input( HWND hwnd, const INPUT *input, UINT flags );
WINUSERAPI BOOL CDECL __wine_send_input( HWND hwnd, const INPUT *input );
-WINUSERAPI BOOL CDECL __wine_set_foreground_window( HWND hwnd, DWORD time );
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ index dd25f8b172c..aeccda79b83 100644
+ else
+ {
+ data->xi2_state = xi_unavailable;
+ WARN( "XInput 2.1 not available\n" );
+ WARN( "X Input 2.1 not available\n" );
+ }
+#endif
+}
Expand All @@ -47,7 +47,7 @@ index dd25f8b172c..aeccda79b83 100644
/***********************************************************************
* enable_xinput2
*/
@@ -298,23 +324,9 @@ void X11DRV_XInput2_Enable(void)
@@ -298,19 +324,9 @@ void X11DRV_XInput2_Enable(void)
unsigned char mask_bits[XIMaskLen(XI_LASTEVENT)];
int count;

Expand All @@ -57,16 +57,12 @@ index dd25f8b172c..aeccda79b83 100644

- if (data->xi2_state == xi_unknown)
- {
- int major = 2, minor = 1;
- if (!pXIQueryVersion( data->display, &major, &minor ) && major == 2 && minor > 0)
- {
- TRACE( "XInput2 v%d.%d available\n", major, minor );
- data->xi2_state = xi_disabled;
- }
- int major = 2, minor = 0;
- if (!pXIQueryVersion( data->display, &major, &minor )) data->xi2_state = xi_disabled;
- else
- {
- data->xi2_state = xi_unavailable;
- WARN( "XInput v2.1 not available\n" );
- WARN( "X Input 2 not available\n" );
- }
- }
- if (data->xi2_state == xi_unavailable) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ index b517e44e150..6f46ef505c9 100644
0, 0, width, height, 0, default_visual.depth, InputOutput, default_visual.visual,
CWEventMask | CWCursor | CWColormap, &win_attr );
if (!win) return FALSE;
+ X11DRV_XInput2_Enable( display, win, win_attr.event_mask );
+ enable_xinput2( display, win, win_attr.event_mask );
if (!create_desktop_win_data( win )) return FALSE;

X11DRV_init_desktop( win, width, height );
Expand Down Expand Up @@ -50,10 +50,10 @@ index aeccda79b83..edf2b94bf9b 100644
+++ b/dlls/winex11.drv/mouse.c
@@ -313,19 +313,31 @@ void x11drv_xinput_init(void)
/***********************************************************************
* X11DRV_XInput2_Enable
* enable_xinput2
*/
-void X11DRV_XInput2_Enable(void)
+void X11DRV_XInput2_Enable( Display *display, Window window, long event_mask )
-static void enable_xinput2(void)
+void enable_xinput2( Display *display, Window window, long event_mask )
{
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
struct x11drv_thread_data *data = x11drv_thread_data();
Expand Down Expand Up @@ -84,7 +84,7 @@ index aeccda79b83..edf2b94bf9b 100644

mask.mask = mask_bits;
mask.mask_len = sizeof(mask_bits);
@@ -337,8 +349,9 @@ static void X11DRV_XInput2_Enable(void)
@@ -337,8 +349,9 @@ static void enable_xinput2(void)
XISetMask( mask_bits, XI_RawMotion );
XISetMask( mask_bits, XI_ButtonPress );

Expand All @@ -95,12 +95,12 @@ index aeccda79b83..edf2b94bf9b 100644
pointer_info = pXIQueryDevice( data->display, data->xi2_core_pointer, &count );
update_relative_valuators( pointer_info->classes, pointer_info->num_classes );
pXIFreeDeviceInfo( pointer_info );
@@ -358,25 +371,39 @@ static void X11DRV_XInput2_Enable(void)
@@ -371,28 +384,42 @@ static void disable_xinput2(void)
/***********************************************************************
* X11DRV_XInput2_Disable
* disable_xinput2
*/
-void X11DRV_XInput2_Disable(void)
+void X11DRV_XInput2_Disable( Display *display, Window window, long event_mask )
-static void disable_xinput2(void)
+void disable_xinput2( Display *display, Window window, long event_mask )
{
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
struct x11drv_thread_data *data = x11drv_thread_data();
Expand All @@ -127,15 +127,20 @@ index aeccda79b83..edf2b94bf9b 100644

mask.mask = NULL;
mask.mask_len = 0;
mask.deviceid = XIAllMasterDevices;
- mask.deviceid = XIAllDevices;
+ mask.deviceid = XIAllMasterDevices;

- pXISelectEvents( data->display, DefaultRootWindow( data->display ), &mask, 1 );
- pXIFreeDeviceInfo( data->xi2_devices );
+ pXISelectEvents( display, DefaultRootWindow( display ), &mask, 1 );
+
+ if (!data) return;
data->x_pos_valuator.number = -1;
data->y_pos_valuator.number = -1;
+ if (data->xi2_devices) pXIFreeDeviceInfo( data->xi2_devices );
data->x_rel_valuator.number = -1;
data->y_rel_valuator.number = -1;
data->xi2_devices = NULL;
data->xi2_core_pointer = 0;
data->xi2_current_slave = 0;
+ data->xi2_state = xi_disabled;
#endif
}
Expand All @@ -144,26 +149,26 @@ index aeccda79b83..edf2b94bf9b 100644
}

/* enable XInput2 unless we are already clipping */
- if (!data->clip_hwnd) X11DRV_XInput2_Enable();
+ if (!data->clip_hwnd) X11DRV_XInput2_Enable( data->display, DefaultRootWindow( data->display ), PointerMotionMask );
- if (!data->clip_hwnd) enable_xinput2();
+ if (!data->clip_hwnd) enable_xinput2( data->display, DefaultRootWindow( data->display ), PointerMotionMask );

if (data->xi2_state != xi_enabled)
{
@@ -453,7 +480,7 @@ static BOOL grab_clipping_window( const RECT *clip )

if (!clipping_cursor)
{
- X11DRV_XInput2_Disable();
+ X11DRV_XInput2_Disable( data->display, DefaultRootWindow( data->display ), PointerMotionMask );
- disable_xinput2();
+ disable_xinput2( data->display, DefaultRootWindow( data->display ), PointerMotionMask );
DestroyWindow( msg_hwnd );
return FALSE;
}
@@ -532,7 +559,7 @@ LRESULT clip_cursor_notify( HWND hwnd, HWND prev_clip_hwnd, HWND new_clip_hwnd )
TRACE( "clip hwnd reset from %p\n", hwnd );
data->clip_hwnd = 0;
data->clip_reset = GetTickCount();
- X11DRV_XInput2_Disable();
+ X11DRV_XInput2_Disable( data->display, DefaultRootWindow( data->display ), PointerMotionMask );
- disable_xinput2();
+ disable_xinput2( data->display, DefaultRootWindow( data->display ), PointerMotionMask );
DestroyWindow( hwnd );
}
else if (prev_clip_hwnd)
Expand All @@ -175,38 +180,36 @@ index f46cbfb088a..93bf3e9c97e 100644
int mask = get_window_attributes( data, &attr );

XChangeWindowAttributes( data->display, data->whole_window, mask, &attr );
+ X11DRV_XInput2_Enable( data->display, data->whole_window, attr.event_mask );
+ enable_xinput2( data->display, data->whole_window, attr.event_mask );
}
}

@@ -1573,6 +1574,7 @@ static void create_whole_window( struct x11drv_win_data *data )
data->vis.visual, mask, &attr );
if (!data->whole_window) goto done;

+ X11DRV_XInput2_Enable( data->display, data->whole_window, attr.event_mask );
+ enable_xinput2( data->display, data->whole_window, attr.event_mask );
set_initial_wm_hints( data->display, data->whole_window );
set_wm_hints( data );

@@ -1879,6 +1881,7 @@ BOOL CDECL X11DRV_CreateWindow( HWND hwnd )
data->clip_window = XCreateWindow( data->display, root_window, 0, 0, 1, 1, 0, 0,
InputOnly, default_visual.visual,
CWOverrideRedirect | CWEventMask, &attr );
+ X11DRV_XInput2_Enable( data->display, data->clip_window, attr.event_mask );
+ enable_xinput2( data->display, data->clip_window, attr.event_mask );
XFlush( data->display );
SetPropA( hwnd, clip_window_prop, (HANDLE)data->clip_window );
X11DRV_InitClipboard();
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 8d556a32a73..9cbedf59ec9 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -197,8 +197,8 @@ extern BOOL CDECL X11DRV_UnrealizePalette( HPALETTE hpal ) DECLSPEC_HIDDEN;
@@ -197,6 +197,8 @@ extern BOOL CDECL X11DRV_UnrealizePalette( HPALETTE hpal ) DECLSPEC_HIDDEN;
extern void X11DRV_Xcursor_Init(void) DECLSPEC_HIDDEN;
extern void X11DRV_XInput2_Load(void) DECLSPEC_HIDDEN;
extern void X11DRV_XInput2_Init(void) DECLSPEC_HIDDEN;
-extern void X11DRV_XInput2_Enable(void) DECLSPEC_HIDDEN;
-extern void X11DRV_XInput2_Disable(void) DECLSPEC_HIDDEN;
+extern void X11DRV_XInput2_Enable( Display *display, Window window, long event_mask ) DECLSPEC_HIDDEN;
+extern void X11DRV_XInput2_Disable( Display *display, Window window, long event_mask ) DECLSPEC_HIDDEN;
+extern void enable_xinput2( Display *display, Window window, long event_mask ) DECLSPEC_HIDDEN;
+extern void disable_xinput2( Display *display, Window window, long event_mask ) DECLSPEC_HIDDEN;

BOOL x11drv_handle_focus_in_event( HWND hwnd, XEvent *xev, Time time );
BOOL x11drv_handle_focus_out_event( HWND hwnd, XEvent *xev, Time time );
Expand All @@ -226,33 +229,11 @@ index 8d556a32a73..9cbedf59ec9 100644
{
Display *display;
@@ -342,7 +352,7 @@ struct x11drv_thread_data
HWND clip_hwnd; /* message window stored in desktop while clipping is active */
DWORD clip_reset; /* time when clipping was last reset */
HKL kbd_layout; /* active keyboard layout */
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
- enum { xi_unavailable = -1, xi_unknown, xi_disabled, xi_enabled } xi2_state; /* XInput2 state */
+ enum xi2_state xi2_state; /* XInput2 state */
XIValuatorClassInfo x_pos_valuator;
XIValuatorClassInfo y_pos_valuator;
int xi2_core_pointer; /* XInput2 core pointer id */
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index 8d556a32a73..9cbedf59ec9 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -640,7 +640,7 @@ void CDECL X11DRV_ThreadDetach(void)
if (data)
{
if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId())
- X11DRV_XInput2_Disable();
+ X11DRV_XInput2_Disable( data->display, DefaultRootWindow( data->display ), PointerMotionMask );
if (data->xim) XCloseIM( data->xim );
if (data->font_set) XFreeFontSet( data->display, data->font_set );
XCloseDisplay( data->display );
@@ -744,7 +744,7 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)

if (use_xim) X11DRV_SetupXIM();
if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId())
- X11DRV_XInput2_Enable();
+ X11DRV_XInput2_Enable( data->display, DefaultRootWindow( data->display ), PointerMotionMask );

X11DRV_XInput2_Init();

void *xi2_devices; /* list of XInput2 devices (valid when state is enabled) */
int xi2_device_count;
struct x11drv_valuator_data x_rel_valuator;
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ index 9cbedf59ec9..b922257c212 100644
{
Display *display;
@@ -359,6 +364,7 @@ struct x11drv_thread_data
struct x11drv_valuator_data y_rel_valuator;
int xi2_core_pointer; /* XInput2 core pointer id */
int xi2_rawinput_only;
#endif
int xi2_current_slave; /* Current slave driving the Core pointer */
+ struct x11drv_ewmh_data ewmh; /* EWMH supported features */
};

Expand Down
2 changes: 1 addition & 1 deletion ps0178-ddraw-Implement-Pick-and-GetPickRecords-.mypatch
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ index 63791c5b606..7f3d2349b9e 100644
{
DDDEVICEIDENTIFIER identifier;
@@ -13996,4 +14126,5 @@ START_TEST(ddraw1)
test_vtbl_protection();
test_window_position();
test_get_display_mode();
run_for_each_device_type(test_texture_wrong_caps);
+ test_pick();
}
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ index 7ed3148e4c4..1e98700a3fd 100644
struct _DISPATCHER_CONTEXT;

/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 122
+#define NTDLL_UNIXLIB_VERSION 123
-#define NTDLL_UNIXLIB_VERSION 124
+#define NTDLL_UNIXLIB_VERSION 125

struct unix_funcs
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ index 1e98700a3fd..649ae047e01 100644
struct _DISPATCHER_CONTEXT;

/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 123
+#define NTDLL_UNIXLIB_VERSION 124
-#define NTDLL_UNIXLIB_VERSION 125
+#define NTDLL_UNIXLIB_VERSION 126

struct unix_funcs
{
Expand Down
4 changes: 2 additions & 2 deletions ps0233-p0001-server-Create-a-desktop-shared-mapping.mypatch
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ index aed7090572b..0b956894110 100644

/* ### protocol_version begin ### */

-#define SERVER_PROTOCOL_VERSION 690
+#define SERVER_PROTOCOL_VERSION 691
-#define SERVER_PROTOCOL_VERSION 691
+#define SERVER_PROTOCOL_VERSION 692

/* ### protocol_version end ### */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ index 0b956894110..ba6d198f95d 100644

/* ### protocol_version begin ### */

-#define SERVER_PROTOCOL_VERSION 691
+#define SERVER_PROTOCOL_VERSION 692
-#define SERVER_PROTOCOL_VERSION 692
+#define SERVER_PROTOCOL_VERSION 693

/* ### protocol_version end ### */

Expand Down Expand Up @@ -157,17 +157,17 @@ index b945c96f7ea..e6ebfd2d0b5 100644
}

if ((foreground = get_foreground_thread( desktop, win )))
#@@ -1843,8 +1843,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
# msg_data->info = input->mouse.info;
# msg_data->flags = flags;
# msg_data->rawinput.type = RIM_TYPEMOUSE;
#- msg_data->rawinput.mouse.x = x - desktop->cursor.x;
#- msg_data->rawinput.mouse.y = y - desktop->cursor.y;
#+ msg_data->rawinput.mouse.x = x - desktop->shared->cursor.x;
#+ msg_data->rawinput.mouse.y = y - desktop->shared->cursor.y;
# msg_data->rawinput.mouse.data = input->mouse.data;
#
# if ((req_flags & SEND_HWMSG_RAWINPUT))
@@ -1843,8 +1843,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
msg_data->info = input->mouse.info;
msg_data->flags = flags;
msg_data->rawinput.type = RIM_TYPEMOUSE;
- msg_data->rawinput.mouse.x = x - desktop->cursor.x;
- msg_data->rawinput.mouse.y = y - desktop->cursor.y;
+ msg_data->rawinput.mouse.x = x - desktop->shared->cursor.x;
+ msg_data->rawinput.mouse.y = y - desktop->shared->cursor.y;
msg_data->rawinput.mouse.data = input->mouse.data;

enum_processes( queue_rawinput_message, &raw_msg );
@@ -2045,8 +2045,8 @@ static void queue_custom_hardware_message( struct desktop *desktop, user_handle_
msg->msg = input->hw.msg;
msg->wparam = 0;
Expand Down
Loading

0 comments on commit 4afe0f2

Please sign in to comment.