win32u: Get rid of no longer needed NtUserSetCallbacks.

This commit is contained in:
Jacek Caban 2022-07-20 01:02:52 +02:00 committed by Alexandre Julliard
parent e52e42b875
commit 88462d9127
7 changed files with 1 additions and 40 deletions

View file

@ -119,23 +119,6 @@ static void dpiaware_init(void)
}
}
static NTSTATUS try_finally( NTSTATUS (CDECL *func)( void *), void *arg,
void (CALLBACK *finally_func)( BOOL ))
{
NTSTATUS status;
__TRY
{
status = func( arg );
}
__FINALLY( finally_func );
return status;
}
static const struct user_callbacks user_funcs =
{
try_finally,
};
static NTSTATUS WINAPI User32CopyImage( const struct copy_image_params *params, ULONG size )
{
HANDLE ret = CopyImage( params->hwnd, params->type, params->dx, params->dy, params->flags );
@ -247,9 +230,6 @@ static BOOL process_attach(void)
{
NtCurrentTeb()->Peb->KernelCallbackTable = kernel_callback_table;
/* FIXME: should not be needed */
NtUserCallOneParam( (UINT_PTR)&user_funcs, NtUserSetCallbacks );
dpiaware_init();
winproc_init();
register_desktop_class();

View file

@ -50,8 +50,6 @@ static GDI_HANDLE_ENTRY *next_unused;
static LONG debug_count;
SYSTEM_BASIC_INFORMATION system_info;
const struct user_callbacks *user_callbacks = NULL;
static inline HGDIOBJ entry_to_handle( GDI_HANDLE_ENTRY *entry )
{
unsigned int idx = entry - gdi_shared->Handles;
@ -1283,7 +1281,6 @@ NTSTATUS gdi_init(void)
NTSTATUS callbacks_init( void *args )
{
user_callbacks = *(const struct user_callbacks **)args;
*(const struct unix_funcs **)args = &unix_funcs;
return 0;
}

View file

@ -25,16 +25,6 @@
#include "ntuser.h"
#include "wine/list.h"
struct dce;
struct tagWND;
struct hardware_msg_data;
struct user_callbacks
{
NTSTATUS (CDECL *try_finally)( NTSTATUS (CDECL *func)( void *), void *arg,
void (CALLBACK *finally_func)( BOOL ));
};
#define WM_SYSTIMER 0x0118
#define WM_POPUPSYSTEMMENU 0x0313

View file

@ -4953,9 +4953,6 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
default: user_check_not_lock(); return 0;
}
case NtUserSetCallbacks:
return (UINT_PTR)InterlockedExchangePointer( (void **)&user_callbacks, (void *)arg );
case NtUserSpyGetVKeyName:
return (UINT_PTR)debugstr_vkey_name( arg );

View file

@ -32,8 +32,6 @@
#include "wine/debug.h"
#include "wine/server.h"
extern const struct user_callbacks *user_callbacks DECLSPEC_HIDDEN;
struct unix_funcs
{
/* win32u functions */

View file

@ -3438,7 +3438,7 @@ BOOL set_window_pos( WINDOWPOS *winpos, int parent_x, int parent_y )
/* child windows get WM_CHILDACTIVATE message */
if ((get_window_long( winpos->hwnd, GWL_STYLE ) & (WS_CHILD | WS_POPUP)) == WS_CHILD)
send_message( winpos->hwnd, WM_CHILDACTIVATE, 0, 0 );
else if (user_callbacks)
else
set_foreground_window( winpos->hwnd, FALSE );
}

View file

@ -924,7 +924,6 @@ enum
NtUserGetDeskPattern,
NtUserGetWinProcPtr,
NtUserLock,
NtUserSetCallbacks,
NtUserSpyGetVKeyName,
};