winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
907 discussions
Start a n
N
ew thread
Alistair Leslie-Hughes : msado15: Implement _Recordset get_EditMode.
by Alexandre Julliard
04 May '22
04 May '22
Module: wine Branch: master Commit: d106b3c450cfa4af2a9fbcca4c640536ebd34bc3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d106b3c450cfa4af2a9fbcca…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Tue May 3 11:11:53 2022 +1000 msado15: Implement _Recordset get_EditMode. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msado15/recordset.c | 12 ++++++++++-- dlls/msado15/tests/msado15.c | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index 766c17598ce..6d3b3ca352f 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -48,6 +48,7 @@ struct recordset CursorLocationEnum cursor_location; CursorTypeEnum cursor_type; IRowset *row_set; + EditModeEnum editmode; }; struct fields @@ -1575,8 +1576,14 @@ static HRESULT WINAPI recordset_put_AbsolutePage( _Recordset *iface, PositionEnu static HRESULT WINAPI recordset_get_EditMode( _Recordset *iface, EditModeEnum *mode ) { - FIXME( "%p, %p\n", iface, mode ); - return E_NOTIMPL; + struct recordset *recordset = impl_from_Recordset( iface ); + TRACE( "%p, %p\n", iface, mode ); + + if (recordset->state == adStateClosed) return MAKE_ADO_HRESULT( adErrObjectClosed ); + if (recordset->index < 0) return MAKE_ADO_HRESULT( adErrNoCurrentRecord ); + + *mode = recordset->editmode; + return S_OK; } static HRESULT WINAPI recordset_get_Filter( _Recordset *iface, VARIANT *criteria ) @@ -2123,6 +2130,7 @@ HRESULT Recordset_create( void **obj ) recordset->cursor_location = adUseServer; recordset->cursor_type = adOpenForwardOnly; recordset->row_set = NULL; + recordset->editmode = adEditNone; *obj = &recordset->Recordset_iface; TRACE( "returning iface %p\n", *obj ); diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index 94e9ae4fa09..b39adf58b22 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -60,6 +60,7 @@ static void test_Recordset(void) BSTR name; HRESULT hr; VARIANT bookmark; + EditModeEnum editmode; hr = CoCreateInstance( &CLSID_Recordset, NULL, CLSCTX_INPROC_SERVER, &IID__Recordset, (void **)&recordset ); ok( hr == S_OK, "got %08lx\n", hr ); @@ -110,6 +111,10 @@ static void test_Recordset(void) ok( hr == S_OK, "got %08lx\n", hr ); ok( cursor == adOpenForwardOnly, "got %d\n", cursor ); + editmode = -1; + hr = _Recordset_get_EditMode( recordset, &editmode ); + ok( hr == MAKE_ADO_HRESULT( adErrObjectClosed ), "got %08lx\n", hr ); + VariantInit( &bookmark ); hr = _Recordset_get_Bookmark( recordset, &bookmark ); ok( hr == MAKE_ADO_HRESULT( adErrObjectClosed ), "got %08lx\n", hr ); @@ -197,6 +202,10 @@ static void test_Recordset(void) ok( is_eof( recordset ), "not eof\n" ); ok( is_bof( recordset ), "not bof\n" ); + editmode = -1; + hr = _Recordset_get_EditMode( recordset, &editmode ); + ok( hr == MAKE_ADO_HRESULT( adErrNoCurrentRecord ), "got %08lx\n", hr ); + hr = _Recordset_Open( recordset, missing, missing, adOpenStatic, adLockBatchOptimistic, adCmdUnspecified ); ok( hr == MAKE_ADO_HRESULT( adErrObjectOpen ), "got %08lx\n", hr ); @@ -223,6 +232,11 @@ static void test_Recordset(void) ok( !is_eof( recordset ), "eof\n" ); ok( !is_bof( recordset ), "bof\n" ); + editmode = -1; + hr = _Recordset_get_EditMode( recordset, &editmode ); + ok( hr == S_OK, "got %08lx\n", hr ); + todo_wine ok( editmode == adEditAdd, "got %d\n", editmode ); + rec_count = -1; hr = _Recordset_get_RecordCount( recordset, &rec_count ); ok( hr == S_OK, "got %08lx\n", hr );
1
0
0
0
Jacek Caban : winex11: Avoid using kernel32 functions in user driver.
by Alexandre Julliard
04 May '22
04 May '22
Module: wine Branch: master Commit: a34669b238b121313b6c3aecdcb1a1fbc231e8a6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a34669b238b121313b6c3aec…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 2 20:00:27 2022 +0200 winex11: Avoid using kernel32 functions in user driver. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/wintab.c | 6 +++--- dlls/winex11.drv/x11drv_main.c | 3 ++- dlls/winex11.drv/xim.c | 25 +++++++++++++------------ dlls/winex11.drv/xrender.c | 6 +++--- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index edd6fb8d271..44d9c7698aa 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -736,7 +736,7 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd ) Button = (XButtonInfoPtr) any; TRACE(" ButtonInput %d: [class %d|length %d|num_buttons %d]\n", class_loop, (int) Button->class, Button->length, Button->num_buttons); - cursor.BTNNAMES = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*cchBuf); + cursor.BTNNAMES = malloc( sizeof(WCHAR) * cchBuf ); for (i = 0; i < cursor.BUTTONS; i++) { /* FIXME - these names are probably incorrect */ @@ -744,14 +744,14 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd ) while (cch > cchBuf - cchPos - 1) /* we want one extra byte for the last NUL */ { cchBuf *= 2; - cursor.BTNNAMES = HeapReAlloc(GetProcessHeap(), 0, cursor.BTNNAMES, sizeof(WCHAR)*cchBuf); + cursor.BTNNAMES = realloc( cursor.BTNNAMES, sizeof(WCHAR) * cchBuf ); } strcpyW(cursor.BTNNAMES + cchPos, cursor.NAME); cchPos += cch; } cursor.BTNNAMES[cchPos++] = 0; - cursor.BTNNAMES = HeapReAlloc(GetProcessHeap(), 0, cursor.BTNNAMES, sizeof(WCHAR)*cchPos); + cursor.BTNNAMES = realloc( cursor.BTNNAMES, sizeof(WCHAR)*cchPos ); cursor.cchBTNNAMES = cchPos; } break; diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index f05885c316a..5347bc7c1a5 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -28,6 +28,7 @@ #include <string.h> #include <sys/time.h> #include <unistd.h> +#include <assert.h> #include <dlfcn.h> #include <X11/cursorfont.h> #include <X11/Xlib.h> @@ -293,7 +294,7 @@ static int error_handler( Display *display, XErrorEvent *error_evt ) { ERR( "X protocol error: serial=%ld, request_code=%d - breaking into debugger\n", error_evt->serial, error_evt->request_code ); - DebugBreak(); /* force an entry in the debugger */ + assert( 0 ); } old_error_handler( display, error_evt ); return 0; diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c index 81f420891ad..4b63a24cccf 100644 --- a/dlls/winex11.drv/xim.c +++ b/dlls/winex11.drv/xim.c @@ -72,13 +72,7 @@ static void X11DRV_ImmSetInternalString(DWORD dwOffset, if (byte_expansion + dwCompStringLength >= dwCompStringSize) { - if (CompositionString) - ptr_new = HeapReAlloc(GetProcessHeap(), 0, CompositionString, - dwCompStringSize + byte_expansion); - else - ptr_new = HeapAlloc(GetProcessHeap(), 0, - dwCompStringSize + byte_expansion); - + ptr_new = realloc( CompositionString, dwCompStringSize + byte_expansion ); if (ptr_new == NULL) { ERR("Couldn't expand composition string buffer\n"); @@ -150,7 +144,7 @@ static void XIMPreEditDoneCallback(XIC ic, XPointer client_data, XPointer call_d TRACE("PreeditDoneCallback %p\n",ic); ximInComposeMode = FALSE; if (dwCompStringSize) - HeapFree(GetProcessHeap(), 0, CompositionString); + free( CompositionString ); dwCompStringSize = 0; dwCompStringLength = 0; CompositionString = NULL; @@ -464,17 +458,24 @@ XIC X11DRV_CreateIC(XIM xim, struct x11drv_win_data *data) XIC xic; XICCallback destroy = {(XPointer)data, X11DRV_DestroyIC}; XICCallback P_StateNotifyCB, P_StartCB, P_DoneCB, P_DrawCB, P_CaretCB; - LANGID langid = PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())); + LCID lcid; Window win = data->whole_window; XFontSet fontSet = x11drv_thread_data()->font_set; TRACE("xim = %p\n", xim); + lcid = NtCurrentTeb()->CurrentLocale; + if (!lcid) NtQueryDefaultLocale( TRUE, &lcid ); + /* use complex and slow XIC initialization method only for CJK */ - if (langid != LANG_CHINESE && - langid != LANG_JAPANESE && - langid != LANG_KOREAN) + switch (PRIMARYLANGID(LANGIDFROMLCID(lcid))) { + case LANG_CHINESE: + case LANG_JAPANESE: + case LANG_KOREAN: + break; + + default: xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, XNClientWindow, win, diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 2a694794397..33725338f60 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -774,7 +774,7 @@ static AA_Type aa_type_from_flags( UINT aa_flags ) static UINT get_xft_aa_flags( const LOGFONTW *lf ) { - char *value; + char *value, *p; UINT ret = 0; switch (lf->lfQuality) @@ -785,8 +785,8 @@ static UINT get_xft_aa_flags( const LOGFONTW *lf ) default: if (!(value = XGetDefault( gdi_display, "Xft", "antialias" ))) break; TRACE( "got antialias '%s'\n", value ); - if (tolower(value[0]) == 'f' || tolower(value[0]) == 'n' || - value[0] == '0' || !_strnicmp( value, "off", -1 )) + for (p = value; *p; p++) if ('A' <= *p && *p <= 'Z') *p += 'a' - 'A'; /* to lower */ + if (value[0] == 'f' || value[0] == 'n' || value[0] == '0' || !strcmp( value, "off" )) { ret = GGO_BITMAP; break;
1
0
0
0
Jacek Caban : winex11: Avoid using kernel32 functions in get_config_key.
by Alexandre Julliard
04 May '22
04 May '22
Module: wine Branch: master Commit: 1a89cea4f6ccc153bb9030dae940ac8a1a9352ca URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1a89cea4f6ccc153bb9030da…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 4 15:36:18 2022 +0200 winex11: Avoid using kernel32 functions in get_config_key. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/x11drv_main.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 22f0f0a729f..f05885c316a 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -422,7 +422,7 @@ static inline DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name, static void setup_options(void) { static const WCHAR x11driverW[] = {'\\','X','1','1',' ','D','r','i','v','e','r',0}; - WCHAR buffer[MAX_PATH+16]; + WCHAR buffer[MAX_PATH+16], *p, *appname; HKEY hkey, appkey = 0; DWORD len; @@ -431,18 +431,21 @@ static void setup_options(void) /* open the app-specific key */ - len = GetModuleFileNameW( 0, buffer, MAX_PATH ); + appname = NtCurrentTeb()->Peb->ProcessParameters->ImagePathName.Buffer; + if ((p = strrchrW( appname, '/' ))) appname = p + 1; + if ((p = strrchrW( appname, '\\' ))) appname = p + 1; + len = lstrlenW( appname ); + if (len && len < MAX_PATH) { HKEY tmpkey; - WCHAR *p, *appname = buffer; - if ((p = strrchrW( appname, '/' ))) appname = p + 1; - if ((p = strrchrW( appname, '\\' ))) appname = p + 1; - CharLowerW(appname); - len = WideCharToMultiByte( CP_UNIXCP, 0, appname, -1, NULL, 0, NULL, NULL ); - if ((process_name = malloc( len ))) - WideCharToMultiByte( CP_UNIXCP, 0, appname, -1, process_name, len, NULL, NULL ); - strcatW( appname, x11driverW ); + int i; + for (i = 0; appname[i]; i++) buffer[i] = RtlDowncaseUnicodeChar( appname[i] ); + buffer[i] = 0; + appname = buffer; + if ((process_name = malloc( len * 3 + 1 ))) + ntdll_wcstoumbs( appname, len + 1, process_name, len * 3 + 1, FALSE ); + memcpy( appname + i, x11driverW, sizeof(x11driverW) ); /* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\X11 Driver */ if ((tmpkey = open_hkcu_key( "Software\\Wine\\AppDefaults" ))) {
1
0
0
0
Jacek Caban : winex11: Avoid using sprintfW.
by Alexandre Julliard
04 May '22
04 May '22
Module: wine Branch: master Commit: 30d5a04f6d8dd74c2a390e3bf9569ad6d5b9c01c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=30d5a04f6d8dd74c2a390e3b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 2 00:43:14 2022 +0200 winex11: Avoid using sprintfW. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/mouse.c | 8 ++++++-- dlls/winex11.drv/settings.c | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 3d68dc80b3e..7133f2e2694 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1053,7 +1053,6 @@ static int find_fallback_shape( const char *name ) */ static Cursor create_xcursor_system_cursor( const ICONINFOEXW *info ) { - static const WCHAR idW[] = {'%','h','u',0}; const struct system_cursors *cursors; unsigned int i; Cursor cursor = 0; @@ -1070,7 +1069,12 @@ static Cursor create_xcursor_system_cursor( const ICONINFOEXW *info ) p = name + strlenW( name ); *p++ = ','; if (info->szResName[0]) strcpyW( p, info->szResName ); - else sprintfW( p, idW, info->wResID ); + else + { + char buf[16]; + sprintf( buf, "%hu", info->wResID ); + asciiz_to_unicode( p, buf ); + } valueA[0] = 0; /* @@ Wine registry key: HKCU\Software\Wine\X11 Driver\Cursors */ diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index 44c61776b4b..1e8868acc6c 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -217,8 +217,6 @@ void init_registry_display_settings(void) static HKEY get_display_device_reg_key( const WCHAR *device_name ) { static const WCHAR display[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y'}; - static const WCHAR video_value_fmt[] = {'\\','D','e','v','i','c','e','\\', - 'V','i','d','e','o','%','d',0}; static const WCHAR video_key[] = { '\\','R','e','g','i','s','t','r','y', '\\','M','a','c','h','i','n','e', @@ -235,6 +233,7 @@ static HKEY get_display_device_reg_key( const WCHAR *device_name ) WCHAR value_name[MAX_PATH], buffer[4096], *end_ptr; KEY_VALUE_PARTIAL_INFORMATION *value = (void *)buffer; DWORD adapter_index, size; + char adapter_name[100]; HKEY hkey; /* Device name has to be \\.\DISPLAY%d */ @@ -248,7 +247,8 @@ static HKEY get_display_device_reg_key( const WCHAR *device_name ) /* Open \Device\Video* in HKLM\HARDWARE\DEVICEMAP\VIDEO\ */ if (!(hkey = reg_open_key( NULL, video_key, sizeof(video_key) ))) return FALSE; - sprintfW(value_name, video_value_fmt, adapter_index); + sprintf( adapter_name, "\\Device\\Video%d", adapter_index ); + asciiz_to_unicode( value_name, adapter_name ); size = query_reg_value( hkey, value_name, value, sizeof(buffer) ); NtClose( hkey ); if (!size || value->Type != REG_SZ) return FALSE;
1
0
0
0
Jacek Caban : winex11: Call create_tooltip from WM_CREATE handler.
by Alexandre Julliard
04 May '22
04 May '22
Module: wine Branch: master Commit: 17afa305777a2cced2fa77f937ecb2216fda3e3c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=17afa305777a2cced2fa77f9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 29 15:53:02 2022 +0200 winex11: Call create_tooltip from WM_CREATE handler. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/systray.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/dlls/winex11.drv/systray.c b/dlls/winex11.drv/systray.c index c6d12b21c28..45ad0617246 100644 --- a/dlls/winex11.drv/systray.c +++ b/dlls/winex11.drv/systray.c @@ -322,14 +322,13 @@ static void add_to_standalone_tray( struct tray_icon *icon ) icon->display = nb_displayed; pos = get_icon_pos( icon ); - icon->window = CreateWindowW( icon_classname, NULL, WS_CHILD | WS_VISIBLE, - pos.x, pos.y, icon_cx, icon_cy, standalone_tray, NULL, NULL, icon ); + CreateWindowW( icon_classname, NULL, WS_CHILD | WS_VISIBLE, + pos.x, pos.y, icon_cx, icon_cy, standalone_tray, NULL, NULL, icon ); if (!icon->window) { icon->display = -1; return; } - create_tooltip( icon ); nb_displayed++; size = get_window_size(); @@ -474,6 +473,11 @@ static LRESULT WINAPI tray_icon_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPAR switch (msg) { + case WM_CREATE: + icon->window = hwnd; + create_tooltip( icon ); + break; + case WM_SIZE: if (icon->window && icon->layered) repaint_tray_icon( icon ); break; @@ -643,10 +647,10 @@ static void dock_systray_icon( Display *display, struct tray_icon *icon, Window get_systray_visual_info( display, systray_window, &visual ); icon->layered = (visual.depth == 32); - icon->window = CreateWindowExW( icon->layered ? WS_EX_LAYERED : 0, - icon_classname, NULL, WS_CLIPSIBLINGS | WS_POPUP, - CW_USEDEFAULT, CW_USEDEFAULT, icon_cx, icon_cy, - NULL, NULL, NULL, icon ); + CreateWindowExW( icon->layered ? WS_EX_LAYERED : 0, + icon_classname, NULL, WS_CLIPSIBLINGS | WS_POPUP, + CW_USEDEFAULT, CW_USEDEFAULT, icon_cx, icon_cy, + NULL, NULL, NULL, icon ); if (!(data = get_win_data( icon->window ))) return; if (icon->layered) set_window_visual( data, &visual, TRUE ); @@ -654,7 +658,6 @@ static void dock_systray_icon( Display *display, struct tray_icon *icon, Window window = data->whole_window; release_win_data( data ); - create_tooltip( icon ); ShowWindow( icon->window, SW_SHOWNA ); TRACE( "icon window %p/%lx\n", icon->window, window );
1
0
0
0
Jacek Caban : winex11: Use X11DRV_CALL for XIM calls.
by Alexandre Julliard
04 May '22
04 May '22
Module: wine Branch: master Commit: bf1d5d286b2c05ed6ba4db060ca905872fa3f621 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bf1d5d286b2c05ed6ba4db06…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 2 21:47:43 2022 +0200 winex11: Use X11DRV_CALL for XIM calls. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/ime.c | 9 ++++++--- dlls/winex11.drv/unixlib.h | 9 +++++++++ dlls/winex11.drv/x11drv.h | 4 ++-- dlls/winex11.drv/x11drv_main.c | 2 ++ dlls/winex11.drv/xim.c | 13 ++++++++----- 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c index c1584930861..1656601577d 100644 --- a/dlls/winex11.drv/ime.c +++ b/dlls/winex11.drv/ime.c @@ -637,6 +637,7 @@ UINT WINAPI ImeToAsciiEx (UINT uVKey, UINT uScanCode, const LPBYTE lpbKeyState, BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) { + struct xim_preedit_state_params preedit_params; BOOL bRet = FALSE; LPINPUTCONTEXT lpIMC; @@ -680,7 +681,9 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) TRACE("IMC_SETOPENSTATUS\n"); bRet = TRUE; - X11DRV_SetPreeditState(lpIMC->hWnd, lpIMC->fOpen); + preedit_params.hwnd = lpIMC->hWnd; + preedit_params.open = lpIMC->fOpen; + X11DRV_CALL( xim_preedit_state, &preedit_params ); if (!lpIMC->fOpen) { LPIMEPRIVATE myPrivate; @@ -688,7 +691,7 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) myPrivate = ImmLockIMCC(lpIMC->hPrivate); if (myPrivate->bInComposition) { - X11DRV_ForceXIMReset(lpIMC->hWnd); + X11DRV_CALL( xim_reset, lpIMC->hWnd ); GenerateIMEMessage(hIMC, WM_IME_ENDCOMPOSITION, 0, 0); myPrivate->bInComposition = FALSE; } @@ -764,7 +767,7 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) TRACE("CPS_CANCEL\n"); - X11DRV_ForceXIMReset(lpIMC->hWnd); + X11DRV_CALL( xim_reset, lpIMC->hWnd ); if (lpIMC->hCompStr) ImmDestroyIMCC(lpIMC->hCompStr); diff --git a/dlls/winex11.drv/unixlib.h b/dlls/winex11.drv/unixlib.h index 062bb59c663..2a957af0f56 100644 --- a/dlls/winex11.drv/unixlib.h +++ b/dlls/winex11.drv/unixlib.h @@ -28,6 +28,8 @@ enum x11drv_funcs unix_tablet_get_packet, unix_tablet_info, unix_tablet_load_info, + unix_xim_preedit_state, + unix_xim_reset, unix_funcs_count, }; @@ -59,6 +61,13 @@ struct tablet_info_params void *output; }; +/* x11drv_xim_preedit_state params */ +struct xim_preedit_state_params +{ + HWND hwnd; + BOOL open; +}; + /* DnD support */ struct format_entry diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 08bfa6dd1d5..c6e5044c110 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -827,8 +827,6 @@ extern BOOL X11DRV_InitXIM( const WCHAR *input_style ) DECLSPEC_HIDDEN; extern XIC X11DRV_CreateIC(XIM xim, struct x11drv_win_data *data) DECLSPEC_HIDDEN; extern void X11DRV_SetupXIM(void) DECLSPEC_HIDDEN; extern void X11DRV_XIMLookupChars( const char *str, DWORD count ) DECLSPEC_HIDDEN; -extern void X11DRV_ForceXIMReset(HWND hwnd) DECLSPEC_HIDDEN; -extern void X11DRV_SetPreeditState(HWND hwnd, BOOL fOpen) DECLSPEC_HIDDEN; #define XEMBED_MAPPED (1 << 0) @@ -849,6 +847,8 @@ extern NTSTATUS x11drv_tablet_attach_queue( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_tablet_get_packet( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_tablet_load_info( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_tablet_info( void *arg ) DECLSPEC_HIDDEN; +extern NTSTATUS x11drv_xim_preedit_state( void *arg ) DECLSPEC_HIDDEN; +extern NTSTATUS x11drv_xim_reset( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS WINAPI x11drv_post_drop( void *data, ULONG size ) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index cc565bd30a7..22f0f0a729f 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -962,6 +962,8 @@ const unixlib_entry_t __wine_unix_call_funcs[] = x11drv_tablet_get_packet, x11drv_tablet_info, x11drv_tablet_load_info, + x11drv_xim_preedit_state, + x11drv_xim_reset, }; diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c index ec4be2e0c5d..81f420891ad 100644 --- a/dlls/winex11.drv/xim.c +++ b/dlls/winex11.drv/xim.c @@ -241,7 +241,7 @@ static void XIMPreEditCaretCallback(XIC ic, XPointer client_data, TRACE("Finished\n"); } -void X11DRV_ForceXIMReset(HWND hwnd) +NTSTATUS x11drv_xim_reset( void *hwnd ) { XIC ic = X11DRV_get_ic(hwnd); if (ic) @@ -251,19 +251,21 @@ void X11DRV_ForceXIMReset(HWND hwnd) leftover = XmbResetIC(ic); XFree(leftover); } + return 0; } -void X11DRV_SetPreeditState(HWND hwnd, BOOL fOpen) +NTSTATUS x11drv_xim_preedit_state( void *arg ) { + struct xim_preedit_state_params *params = arg; XIC ic; XIMPreeditState state; XVaNestedList attr; - ic = X11DRV_get_ic(hwnd); + ic = X11DRV_get_ic( params->hwnd ); if (!ic) - return; + return 0; - if (fOpen) + if (params->open) state = XIMPreeditEnable; else state = XIMPreeditDisable; @@ -274,6 +276,7 @@ void X11DRV_SetPreeditState(HWND hwnd, BOOL fOpen) XSetICValues(ic, XNPreeditAttributes, attr, NULL); XFree(attr); } + return 0; }
1
0
0
0
Jacek Caban : winex11: Introduce X11DRV_CALL macro.
by Alexandre Julliard
04 May '22
04 May '22
Module: wine Branch: master Commit: 095773b36a5822a0a6752741073765bdd23d69c9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=095773b36a5822a0a6752741…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 2 21:15:10 2022 +0200 winex11: Introduce X11DRV_CALL macro. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/dllmain.c | 14 +++++++------- dlls/winex11.drv/unixlib.h | 16 ++++++++++++++++ dlls/winex11.drv/x11drv.h | 1 - dlls/winex11.drv/x11drv_main.c | 24 +++++++++++++++++++++++- 4 files changed, 46 insertions(+), 9 deletions(-) diff --git a/dlls/winex11.drv/dllmain.c b/dlls/winex11.drv/dllmain.c index 84c20217c78..6a9f4a57273 100644 --- a/dlls/winex11.drv/dllmain.c +++ b/dlls/winex11.drv/dllmain.c @@ -76,7 +76,7 @@ static LRESULT CALLBACK clipboard_wndproc( HWND hwnd, UINT msg, WPARAM wp, LPARA params.msg = msg; params.wparam = wp; params.lparam = lp; - return x11drv_clipboard_message( ¶ms ); + return X11DRV_CALL( clipboard_message, ¶ms ); } return DefWindowProcW( hwnd, msg, wp, lp ); @@ -132,7 +132,7 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved ) DisableThreadLibraryCalls( instance ); x11drv_module = instance; - return !x11drv_init( NULL ); + return !X11DRV_CALL( init, NULL ); } @@ -142,7 +142,7 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved ) BOOL CDECL wine_create_desktop( UINT width, UINT height ) { struct create_desktop_params params = { .width = width, .height = height }; - return x11drv_create_desktop( ¶ms ); + return X11DRV_CALL( create_desktop, ¶ms ); } /*********************************************************************** @@ -150,7 +150,7 @@ BOOL CDECL wine_create_desktop( UINT width, UINT height ) */ int CDECL X11DRV_AttachEventQueueToTablet( HWND owner ) { - return x11drv_tablet_attach_queue( owner ); + return X11DRV_CALL( tablet_attach_queue, owner ); } /*********************************************************************** @@ -158,7 +158,7 @@ int CDECL X11DRV_AttachEventQueueToTablet( HWND owner ) */ int CDECL X11DRV_GetCurrentPacket( void *packet ) { - return x11drv_tablet_get_packet( packet ); + return X11DRV_CALL( tablet_get_packet, packet ); } /*********************************************************************** @@ -166,7 +166,7 @@ int CDECL X11DRV_GetCurrentPacket( void *packet ) */ BOOL CDECL X11DRV_LoadTabletInfo( HWND hwnd ) { - return x11drv_tablet_load_info( hwnd ); + return X11DRV_CALL( tablet_load_info, hwnd ); } /*********************************************************************** @@ -178,5 +178,5 @@ UINT CDECL X11DRV_WTInfoW( UINT category, UINT index, void *output ) params.category = category; params.index = index; params.output = output; - return x11drv_tablet_info( ¶ms ); + return X11DRV_CALL( tablet_info, ¶ms ); } diff --git a/dlls/winex11.drv/unixlib.h b/dlls/winex11.drv/unixlib.h index 231beb055dc..062bb59c663 100644 --- a/dlls/winex11.drv/unixlib.h +++ b/dlls/winex11.drv/unixlib.h @@ -19,6 +19,22 @@ #include "ntuser.h" #include "wine/unixlib.h" +enum x11drv_funcs +{ + unix_clipboard_message, + unix_create_desktop, + unix_init, + unix_tablet_attach_queue, + unix_tablet_get_packet, + unix_tablet_info, + unix_tablet_load_info, + unix_funcs_count, +}; + +/* 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; +#define X11DRV_CALL(func, params) x11drv_unix_call( unix_ ## func, params ) + /* x11drv_clipboard_message params */ struct clipboard_message_params { diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 5f49f609e1e..08bfa6dd1d5 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -843,7 +843,6 @@ static inline BOOL is_window_rect_mapped( const RECT *rect ) /* unixlib interface */ -extern NTSTATUS x11drv_init( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_clipboard_message( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_create_desktop( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_tablet_attach_queue( void *arg ) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index eb11b532af7..cc565bd30a7 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -629,7 +629,7 @@ static void init_visuals( Display *display, int screen ) /*********************************************************************** * X11DRV process initialisation routine */ -NTSTATUS x11drv_init( void *arg ) +static NTSTATUS x11drv_init( void *arg ) { Display *display; void *libx11 = dlopen( SONAME_LIBX11, RTLD_NOW|RTLD_GLOBAL ); @@ -951,3 +951,25 @@ NTSTATUS CDECL X11DRV_D3DKMTCheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDP pthread_mutex_unlock( &d3dkmt_mutex ); return STATUS_SUCCESS; } + + +const unixlib_entry_t __wine_unix_call_funcs[] = +{ + x11drv_clipboard_message, + x11drv_create_desktop, + x11drv_init, + x11drv_tablet_attach_queue, + x11drv_tablet_get_packet, + x11drv_tablet_info, + x11drv_tablet_load_info, +}; + + +C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count ); + + +/* FIXME: Use __wine_unix_call instead */ +NTSTATUS x11drv_unix_call( enum x11drv_funcs code, void *params ) +{ + return __wine_unix_call_funcs[code]( params ); +}
1
0
0
0
Jacek Caban : winex11: Move wintab entry points to dllmain.c.
by Alexandre Julliard
04 May '22
04 May '22
Module: wine Branch: master Commit: 27b151763dcd23c17f0f30958288f42dabeea912 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27b151763dcd23c17f0f3095…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 2 20:12:01 2022 +0200 winex11: Move wintab entry points to dllmain.c. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/dllmain.c | 36 ++++++++++++++++++++++++++++++++++++ dlls/winex11.drv/unixlib.h | 8 ++++++++ dlls/winex11.drv/wintab.c | 45 +++++++++++++++++++++++++-------------------- dlls/winex11.drv/x11drv.h | 4 ++++ 4 files changed, 73 insertions(+), 20 deletions(-) diff --git a/dlls/winex11.drv/dllmain.c b/dlls/winex11.drv/dllmain.c index f5e829d73af..84c20217c78 100644 --- a/dlls/winex11.drv/dllmain.c +++ b/dlls/winex11.drv/dllmain.c @@ -144,3 +144,39 @@ BOOL CDECL wine_create_desktop( UINT width, UINT height ) struct create_desktop_params params = { .width = width, .height = height }; return x11drv_create_desktop( ¶ms ); } + +/*********************************************************************** + * AttachEventQueueToTablet (winex11.@) + */ +int CDECL X11DRV_AttachEventQueueToTablet( HWND owner ) +{ + return x11drv_tablet_attach_queue( owner ); +} + +/*********************************************************************** + * GetCurrentPacket (winex11.@) + */ +int CDECL X11DRV_GetCurrentPacket( void *packet ) +{ + return x11drv_tablet_get_packet( packet ); +} + +/*********************************************************************** + * LoadTabletInfo (winex11.@) + */ +BOOL CDECL X11DRV_LoadTabletInfo( HWND hwnd ) +{ + return x11drv_tablet_load_info( hwnd ); +} + +/*********************************************************************** + * WTInfoW (winex11.@) + */ +UINT CDECL X11DRV_WTInfoW( UINT category, UINT index, void *output ) +{ + struct tablet_info_params params; + params.category = category; + params.index = index; + params.output = output; + return x11drv_tablet_info( ¶ms ); +} diff --git a/dlls/winex11.drv/unixlib.h b/dlls/winex11.drv/unixlib.h index 43a00b619c1..231beb055dc 100644 --- a/dlls/winex11.drv/unixlib.h +++ b/dlls/winex11.drv/unixlib.h @@ -35,6 +35,14 @@ struct create_desktop_params UINT height; }; +/* x11drv_tablet_info params */ +struct tablet_info_params +{ + UINT category; + UINT index; + void *output; +}; + /* DnD support */ struct format_entry diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index aa0d7be2fd0..edd6fb8d271 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -481,9 +481,9 @@ static void disable_system_cursors(void) /*********************************************************************** - * X11DRV_LoadTabletInfo (X11DRV.@) + * x11drv_tablet_load_info */ -BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault) +NTSTATUS x11drv_tablet_load_info( void *hwnd ) { static const WCHAR SZ_CONTEXT_NAME[] = {'W','i','n','e',' ','T','a','b','l','e','t',' ','C','o','n','t','e','x','t',0}; static const WCHAR SZ_DEVICE_NAME[] = {'W','i','n','e',' ','T','a','b','l','e','t',' ','D','e','v','i','c','e',0}; @@ -509,7 +509,7 @@ BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault) return FALSE; } - hwndTabletDefault = hwnddefault; + hwndTabletDefault = hwnd; /* Do base initialization */ strcpyW(gSysContext.lcName, SZ_CONTEXT_NAME); @@ -1001,9 +1001,9 @@ static BOOL proximity_event( HWND hwnd, XEvent *event ) } /*********************************************************************** - * X11DRV_AttachEventQueueToTablet (X11DRV.@) + * x11drv_tablet_attach_queue */ -int CDECL X11DRV_AttachEventQueueToTablet(HWND hOwner) +NTSTATUS x11drv_tablet_attach_queue( void *owner ) { struct x11drv_thread_data *data = x11drv_init_thread_data(); int num_devices; @@ -1013,11 +1013,11 @@ int CDECL X11DRV_AttachEventQueueToTablet(HWND hOwner) XDeviceInfo *target = NULL; XDevice *the_device; XEventClass event_list[7]; - Window win = X11DRV_get_whole_window( hOwner ); + Window win = X11DRV_get_whole_window( owner ); if (!win || !xinput_handle) return 0; - TRACE("Creating context for window %p (%lx) %i cursors\n", hOwner, win, gNumCursors); + TRACE("Creating context for window %p (%lx) %i cursors\n", owner, win, gNumCursors); devices = pXListInputDevices(data->display, &num_devices); @@ -1093,11 +1093,11 @@ int CDECL X11DRV_AttachEventQueueToTablet(HWND hOwner) } /*********************************************************************** - * X11DRV_GetCurrentPacket (X11DRV.@) + * x11drv_tablet_get_packet */ -int CDECL X11DRV_GetCurrentPacket(LPWTPACKET packet) +NTSTATUS x11drv_tablet_get_packet( void *packet ) { - *packet = gMsgPacket; + *(WTPACKET *)packet = gMsgPacket; return 1; } @@ -1114,10 +1114,15 @@ static inline int CopyTabletData(LPVOID target, LPCVOID src, INT size) } /*********************************************************************** - * X11DRV_WTInfoW (X11DRV.@) + * x11drv_tablet_info */ -UINT CDECL X11DRV_WTInfoW(UINT wCategory, UINT nIndex, LPVOID lpOutput) +NTSTATUS x11drv_tablet_info( void *arg ) { + struct tablet_info_params *params = arg; + UINT wCategory = params->category; + UINT nIndex = params->index; + void *lpOutput = params->output; + /* * It is valid to call WTInfoA with lpOutput == NULL, as per standard. * lpOutput == NULL signifies the user only wishes @@ -1546,33 +1551,33 @@ UINT CDECL X11DRV_WTInfoW(UINT wCategory, UINT nIndex, LPVOID lpOutput) #else /* SONAME_LIBXI */ /*********************************************************************** - * AttachEventQueueToTablet (X11DRV.@) + * x11drv_tablet_attach_queue */ -int CDECL X11DRV_AttachEventQueueToTablet(HWND hOwner) +NTSTATUS x11drv_tablet_attach_queue( void *owner ) { return 0; } /*********************************************************************** - * GetCurrentPacket (X11DRV.@) + * x11drv_tablet_get_packet */ -int CDECL X11DRV_GetCurrentPacket(LPWTPACKET packet) +NTSTATUS x11drv_tablet_get_packet( void *arg ) { return 0; } /*********************************************************************** - * LoadTabletInfo (X11DRV.@) + * x11drv_tablet_load_info */ -BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault) +NTSTATUS x11drv_tablet_load_info( void *arg ) { return FALSE; } /*********************************************************************** - * WTInfoW (X11DRV.@) + * x11drv_tablet_info */ -UINT CDECL X11DRV_WTInfoW(UINT wCategory, UINT nIndex, LPVOID lpOutput) +NTSTATUS x11drv_tablet_info( void *arg ) { return 0; } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index bda4322d26b..5f49f609e1e 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -846,6 +846,10 @@ static inline BOOL is_window_rect_mapped( const RECT *rect ) extern NTSTATUS x11drv_init( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_clipboard_message( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_create_desktop( void *arg ) DECLSPEC_HIDDEN; +extern NTSTATUS x11drv_tablet_attach_queue( void *arg ) DECLSPEC_HIDDEN; +extern NTSTATUS x11drv_tablet_get_packet( void *arg ) DECLSPEC_HIDDEN; +extern NTSTATUS x11drv_tablet_load_info( void *arg ) DECLSPEC_HIDDEN; +extern NTSTATUS x11drv_tablet_info( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS WINAPI x11drv_post_drop( void *data, ULONG size ) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : winex11: Move create_desktop implementation to dllmain.c.
by Alexandre Julliard
04 May '22
04 May '22
Module: wine Branch: master Commit: 0062917fdf195160bf6872dc90c60834738ae044 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0062917fdf195160bf6872dc…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 2 00:07:10 2022 +0200 winex11: Move create_desktop implementation to dllmain.c. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/desktop.c | 13 +++++++------ dlls/winex11.drv/dllmain.c | 10 ++++++++++ dlls/winex11.drv/unixlib.h | 7 +++++++ dlls/winex11.drv/winex11.drv.spec | 2 +- dlls/winex11.drv/x11drv.h | 1 + 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index f8c44549fc1..61fe5578e8b 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -321,13 +321,14 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height ) /*********************************************************************** - * X11DRV_create_desktop + * x11drv_create_desktop * * Create the X11 desktop window for the desktop mode. */ -BOOL CDECL X11DRV_create_desktop( UINT width, UINT height ) +NTSTATUS x11drv_create_desktop( void *arg ) { static const WCHAR rootW[] = {'r','o','o','t',0}; + const struct create_desktop_params *params = arg; XSetWindowAttributes win_attr; Window win; Display *display = thread_init_display(); @@ -337,7 +338,7 @@ BOOL CDECL X11DRV_create_desktop( UINT width, UINT height ) UOI_NAME, name, sizeof(name), NULL )) name[0] = 0; - TRACE( "%s %ux%u\n", debugstr_w(name), width, height ); + TRACE( "%s %ux%u\n", debugstr_w(name), params->width, params->height ); /* magic: desktop "root" means use the root window */ if (!lstrcmpiW( name, rootW )) return FALSE; @@ -354,12 +355,12 @@ BOOL CDECL X11DRV_create_desktop( UINT width, UINT height ) win_attr.colormap = None; win = XCreateWindow( display, DefaultRootWindow(display), - 0, 0, width, height, 0, default_visual.depth, InputOutput, default_visual.visual, - CWEventMask | CWCursor | CWColormap, &win_attr ); + 0, 0, params->width, params->height, 0, default_visual.depth, InputOutput, + default_visual.visual, CWEventMask | CWCursor | CWColormap, &win_attr ); if (!win) return FALSE; if (!create_desktop_win_data( win )) return FALSE; - X11DRV_init_desktop( win, width, height ); + X11DRV_init_desktop( win, params->width, params->height ); if (is_desktop_fullscreen()) { TRACE("setting desktop to fullscreen\n"); diff --git a/dlls/winex11.drv/dllmain.c b/dlls/winex11.drv/dllmain.c index 49db5e3d2a5..f5e829d73af 100644 --- a/dlls/winex11.drv/dllmain.c +++ b/dlls/winex11.drv/dllmain.c @@ -134,3 +134,13 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved ) x11drv_module = instance; return !x11drv_init( NULL ); } + + +/*********************************************************************** + * wine_create_desktop (winex11.@) + */ +BOOL CDECL wine_create_desktop( UINT width, UINT height ) +{ + struct create_desktop_params params = { .width = width, .height = height }; + return x11drv_create_desktop( ¶ms ); +} diff --git a/dlls/winex11.drv/unixlib.h b/dlls/winex11.drv/unixlib.h index 3865ecab7a0..43a00b619c1 100644 --- a/dlls/winex11.drv/unixlib.h +++ b/dlls/winex11.drv/unixlib.h @@ -28,6 +28,13 @@ struct clipboard_message_params LPARAM lparam; }; +/* x11drv_create_desktop params */ +struct create_desktop_params +{ + UINT width; + UINT height; +}; + /* DnD support */ struct format_entry diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index 6e0ccfab4b0..77e4a6285de 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -5,7 +5,7 @@ @ cdecl WTInfoW(long long ptr) X11DRV_WTInfoW # Desktop -@ cdecl wine_create_desktop(long long) X11DRV_create_desktop +@ cdecl wine_create_desktop(long long) # System tray @ cdecl wine_notify_icon(long ptr) diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 4dc251b9ac2..bda4322d26b 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -845,6 +845,7 @@ static inline BOOL is_window_rect_mapped( const RECT *rect ) extern NTSTATUS x11drv_init( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_clipboard_message( void *arg ) DECLSPEC_HIDDEN; +extern NTSTATUS x11drv_create_desktop( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS WINAPI x11drv_post_drop( void *data, ULONG size ) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : winex11: Move x11drv_post_drop to xdnd.c.
by Alexandre Julliard
04 May '22
04 May '22
Module: wine Branch: master Commit: fce3f9c323feaf257859d1a037f16818a11eb105 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fce3f9c323feaf257859d1a0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue May 3 14:42:24 2022 +0200 winex11: Move x11drv_post_drop to xdnd.c. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/event.c | 12 ++---------- dlls/winex11.drv/x11drv.h | 2 ++ dlls/winex11.drv/xdnd.c | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index a6499400283..105caab5deb 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -1478,16 +1478,8 @@ static HWND find_drop_window( HWND hQueryWnd, LPPOINT lpPt ) static void post_drop( HWND hwnd, DROPFILES *drop, ULONG size ) { - HDROP handle; - - if ((handle = GlobalAlloc( GMEM_SHARE, size ))) - { - DROPFILES *ptr = GlobalLock( handle ); - memcpy( ptr, drop, size ); - ptr->fWide = TRUE; - GlobalUnlock( handle ); - PostMessageW( hwnd, WM_DROPFILES, (WPARAM)handle, 0 ); - } + drop->fWide = HandleToUlong( hwnd ); /* abuse fWide to pass window handle */ + x11drv_post_drop( drop, size ); } /********************************************************************** diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index b763a7aa345..4dc251b9ac2 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -846,6 +846,8 @@ static inline BOOL is_window_rect_mapped( const RECT *rect ) extern NTSTATUS x11drv_init( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_clipboard_message( void *arg ) DECLSPEC_HIDDEN; +extern NTSTATUS WINAPI x11drv_post_drop( void *data, ULONG size ) DECLSPEC_HIDDEN; + /* GDI helpers */ static inline BOOL lp_to_dp( HDC hdc, POINT *points, INT count ) diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c index d5ae510db49..45205c836be 100644 --- a/dlls/winex11.drv/xdnd.c +++ b/dlls/winex11.drv/xdnd.c @@ -748,3 +748,21 @@ UINT handle_dnd_event( void *params ) return 0; } } + +NTSTATUS WINAPI x11drv_post_drop( void *data, ULONG size ) +{ + HDROP handle; + + if ((handle = GlobalAlloc( GMEM_SHARE, size ))) + { + DROPFILES *ptr = GlobalLock( handle ); + HWND hwnd; + memcpy( ptr, data, size ); + hwnd = UlongToHandle( ptr->fWide ); + ptr->fWide = TRUE; + GlobalUnlock( handle ); + PostMessageW( hwnd, WM_DROPFILES, (WPARAM)handle, 0 ); + } + + return 0; +}
1
0
0
0
← Newer
1
...
70
71
72
73
74
75
76
...
91
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Results per page:
10
25
50
100
200