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 2011
----- 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
945 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11: Try a little harder to clip the cursor to avoid some race conditions.
by Alexandre Julliard
13 May '11
13 May '11
Module: wine Branch: master Commit: e52e57d13342d1d688126a6d8493219f740c5a3b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e52e57d13342d1d688126a6d8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 13 16:44:09 2011 +0200 winex11: Try a little harder to clip the cursor to avoid some race conditions. --- dlls/winex11.drv/mouse.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 70cdd86..d369f6c 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -396,14 +396,14 @@ static BOOL grab_clipping_window( const RECT *clip, BOOL only_with_xinput ) return TRUE; } - TRACE( "clipping to %s\n", wine_dbgstr_rect(clip) ); + TRACE( "clipping to %s win %lx\n", wine_dbgstr_rect(clip), clip_window ); wine_tsx11_lock(); if (msg_hwnd) XUnmapWindow( data->display, clip_window ); XMoveResizeWindow( data->display, clip_window, clip->left - virtual_screen_rect.left, clip->top - virtual_screen_rect.top, clip->right - clip->left, clip->bottom - clip->top ); - if (msg_hwnd) XMapWindow( data->display, clip_window ); + XMapWindow( data->display, clip_window ); if (!XGrabPointer( data->display, clip_window, False, PointerMotionMask | ButtonPressMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync, clip_window, None, CurrentTime )) @@ -516,7 +516,7 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) if (!is_window_rect_fullscreen( &data->whole_rect )) return FALSE; if (!(thread_data = x11drv_thread_data())) return FALSE; if (GetTickCount() - thread_data->clip_reset < 1000) return FALSE; - if (!reset && thread_data->clip_hwnd) return FALSE; /* already clipping */ + if (!reset && clipping_cursor && thread_data->clip_hwnd) return FALSE; /* already clipping */ SetRect( &rect, 0, 0, screen_width, screen_height ); if (!grab_fullscreen) {
1
0
0
0
Alexandre Julliard : winex11: Allow MotionNotify events through occasionally while XInput is active.
by Alexandre Julliard
13 May '11
13 May '11
Module: wine Branch: master Commit: 8e9b4e0a5c6bee5f72ca2314db26233638f0e1d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e9b4e0a5c6bee5f72ca2314d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 13 16:19:45 2011 +0200 winex11: Allow MotionNotify events through occasionally while XInput is active. --- dlls/winex11.drv/event.c | 10 +++++++--- dlls/winex11.drv/mouse.c | 12 +++++++----- dlls/winex11.drv/x11drv.h | 1 + 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 6ef1e07..f2e2841 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -323,10 +323,14 @@ static enum event_merge_action merge_events( XEvent *prev, XEvent *next ) switch (next->type) { case MotionNotify: - if (next->xany.window == x11drv_thread_data()->clip_window) { - TRACE( "ignoring MotionNotify for clip window\n" ); - return MERGE_IGNORE; + struct x11drv_thread_data *thread_data = x11drv_thread_data(); + if (next->xany.window == thread_data->clip_window && + next->xmotion.time - thread_data->last_motion_notify < 1000) + { + TRACE( "ignoring MotionNotify for clip window\n" ); + return MERGE_IGNORE; + } } break; case GenericEvent: diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 6c56b15..70cdd86 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -547,11 +547,6 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU if (thread_data->clip_window != window) return; input->u.mi.dx += clip_rect.left; input->u.mi.dy += clip_rect.top; - if (!(input->u.mi.dwFlags & ~(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE))) - { - /* motion events are ignored when xinput2 is active */ - if (thread_data->xi2_state == xi_enabled) return; - } __wine_send_input( hwnd, input ); return; } @@ -1366,6 +1361,13 @@ void X11DRV_MotionNotify( HWND hwnd, XEvent *xev ) input.u.mi.time = EVENT_x11_time_to_win32_time( event->time ); input.u.mi.dwExtraInfo = 0; + if (!hwnd) + { + struct x11drv_thread_data *thread_data = x11drv_thread_data(); + if (event->time - thread_data->last_motion_notify < 1000) return; + thread_data->last_motion_notify = event->time; + } + send_mouse_input( hwnd, event->window, event->state, &input ); } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index ca7a379..a14fa39 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -548,6 +548,7 @@ struct x11drv_thread_data HWND last_focus; /* last window that had focus */ XIM xim; /* input method */ HWND last_xic_hwnd; /* last xic window */ + Time last_motion_notify; /* time of last mouse motion */ XFontSet font_set; /* international text drawing font set */ Window selection_wnd; /* window used for selection interactions */ Window clip_window; /* window used for cursor clipping */
1
0
0
0
Alexandre Julliard : winex11: Don' t use raw events for button events so that we get the right coordinates.
by Alexandre Julliard
13 May '11
13 May '11
Module: wine Branch: master Commit: fd4ad5a60433b8314dce684b9d52f43769cd5867 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd4ad5a60433b8314dce684b9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 13 12:40:19 2011 +0200 winex11: Don't use raw events for button events so that we get the right coordinates. --- dlls/winex11.drv/mouse.c | 74 +++++++--------------------------------------- 1 files changed, 11 insertions(+), 63 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 5fd7338..6c56b15 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -290,9 +290,6 @@ static void enable_xinput2(void) mask.mask = mask_bits; mask.mask_len = sizeof(mask_bits); memset( mask_bits, 0, sizeof(mask_bits) ); - - XISetMask( mask_bits, XI_RawButtonPress ); - XISetMask( mask_bits, XI_RawButtonRelease ); XISetMask( mask_bits, XI_RawMotion ); for (i = 0; i < count; ++i) @@ -542,11 +539,20 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU input->type = INPUT_MOUSE; - if (!hwnd && window == x11drv_thread_data()->clip_window) + if (!hwnd) { + struct x11drv_thread_data *thread_data = x11drv_thread_data(); + + if (!thread_data->clip_hwnd) return; + if (thread_data->clip_window != window) return; input->u.mi.dx += clip_rect.left; input->u.mi.dy += clip_rect.top; - if (x11drv_thread_data()->xi2_state != xi_enabled) __wine_send_input( hwnd, input ); + if (!(input->u.mi.dwFlags & ~(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE))) + { + /* motion events are ignored when xinput2 is active */ + if (thread_data->xi2_state == xi_enabled) return; + } + __wine_send_input( hwnd, input ); return; } @@ -1391,56 +1397,6 @@ void X11DRV_EnterNotify( HWND hwnd, XEvent *xev ) #ifdef HAVE_X11_EXTENSIONS_XINPUT2_H /*********************************************************************** - * X11DRV_RawButtonPress - */ -static void X11DRV_RawButtonPress( XIRawEvent *event ) -{ - int button = event->detail - 1; - INPUT input; - - if (button >= NB_BUTTONS) return; - - TRACE( "button %u\n", button ); - - input.type = INPUT_MOUSE; - input.u.mi.dx = 0; - input.u.mi.dy = 0; - input.u.mi.mouseData = button_down_data[button]; - input.u.mi.dwFlags = button_down_flags[button]; - input.u.mi.time = EVENT_x11_time_to_win32_time( event->time ); - input.u.mi.dwExtraInfo = 0; - - update_user_time( event->time ); - input.type = INPUT_MOUSE; - __wine_send_input( 0, &input ); -} - - -/*********************************************************************** - * X11DRV_RawButtonRelease - */ -static void X11DRV_RawButtonRelease( XIRawEvent *event ) -{ - int button = event->detail - 1; - INPUT input; - - if (button >= NB_BUTTONS) return; - - TRACE( "button %u\n", button ); - - input.u.mi.dx = 0; - input.u.mi.dy = 0; - input.u.mi.mouseData = button_up_data[button]; - input.u.mi.dwFlags = button_up_flags[button]; - input.u.mi.time = EVENT_x11_time_to_win32_time( event->time ); - input.u.mi.dwExtraInfo = 0; - - input.type = INPUT_MOUSE; - __wine_send_input( 0, &input ); -} - - -/*********************************************************************** * X11DRV_RawMotion */ static void X11DRV_RawMotion( XIRawEvent *event ) @@ -1518,14 +1474,6 @@ void X11DRV_GenericEvent( HWND hwnd, XEvent *xev ) switch (event->evtype) { - case XI_RawButtonPress: - X11DRV_RawButtonPress( event->data ); - break; - - case XI_RawButtonRelease: - X11DRV_RawButtonRelease( event->data ); - break; - case XI_RawMotion: X11DRV_RawMotion( event->data ); break;
1
0
0
0
Jörg Höhle : include: Define DRV_MCI_FIRST.
by Alexandre Julliard
13 May '11
13 May '11
Module: wine Branch: master Commit: 2e177cb24962f61343aff98eb79eccb9d8237e5a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2e177cb24962f61343aff98eb…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Wed Dec 15 21:18:47 2010 +0100 include: Define DRV_MCI_FIRST. --- include/mmsystem.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/mmsystem.h b/include/mmsystem.h index 4631762..ef74c75 100644 --- a/include/mmsystem.h +++ b/include/mmsystem.h @@ -200,6 +200,8 @@ typedef struct mmtime_tag { #define DRV_POWER 0x000F #define DRV_RESERVED 0x0800 +#define DRV_MCI_FIRST DRV_RESERVED +#define DRV_MCI_LAST (0xFFF + DRV_MCI_FIRST) #define DRV_USER 0x4000 #define DRVCNF_CANCEL 0x0000
1
0
0
0
Nikolay Sivov : comctl32/listview: Fix parameter validation for LVM_SETITEMTEXT.
by Alexandre Julliard
13 May '11
13 May '11
Module: wine Branch: master Commit: c6dd14199c6f48161ee8393232cb4daddb4df78d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c6dd14199c6f48161ee839323…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri May 13 01:52:09 2011 +0400 comctl32/listview: Fix parameter validation for LVM_SETITEMTEXT. --- dlls/comctl32/listview.c | 4 ++-- dlls/comctl32/tests/listview.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 8f7745f..86c3f76 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -8785,8 +8785,8 @@ static BOOL LISTVIEW_SetItemTextT(LISTVIEW_INFO *infoPtr, INT nItem, const LVITE { LVITEMW lvItem; - if (nItem < 0 && nItem >= infoPtr->nItemCount) return FALSE; - + if (!lpLVItem || nItem < 0 || nItem >= infoPtr->nItemCount) return FALSE; + lvItem.iItem = nItem; lvItem.iSubItem = lpLVItem->iSubItem; lvItem.mask = LVIF_TEXT; diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 20f231e..7f9f7a7 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -4710,6 +4710,40 @@ static void test_dispinfo(void) DestroyWindow(hwnd); } +static void test_LVM_SETITEMTEXT(void) +{ + static char testA[] = "TEST"; + LVITEMA item; + HWND hwnd; + DWORD ret; + + hwnd = create_listview_control(LVS_ICON); + ok(hwnd != NULL, "failed to create listview window\n"); + + insert_item(hwnd, 0); + + /* null item pointer */ + ret = SendMessage(hwnd, LVM_SETITEMTEXTA, 0, 0); + expect(FALSE, ret); + + ret = SendMessage(hwnd, LVM_SETITEMTEXTW, 0, 0); + expect(FALSE, ret); + + /* index out of bounds */ + item.pszText = testA; + item.cchTextMax = 0; /* ignored */ + ret = SendMessageA(hwnd, LVM_SETITEMTEXTA, 1, (LPARAM)&item); + expect(FALSE, ret); + + ret = SendMessageA(hwnd, LVM_SETITEMTEXTA, -1, (LPARAM)&item); + expect(FALSE, ret); + + ret = SendMessageA(hwnd, LVM_SETITEMTEXTA, 0, (LPARAM)&item); + expect(TRUE, ret); + + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -4774,6 +4808,7 @@ START_TEST(listview) test_destroynotify(); test_createdragimage(); test_dispinfo(); + test_LVM_SETITEMTEXT(); if (!load_v6_module(&ctx_cookie, &hCtx)) {
1
0
0
0
Anders Jonsson : winecfg: Update Swedish translation.
by Alexandre Julliard
13 May '11
13 May '11
Module: wine Branch: master Commit: 2096d9014113b7cb1eeb38f819731a037aa3a255 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2096d9014113b7cb1eeb38f81…
Author: Anders Jonsson <anders.jonsson(a)norsjonet.se> Date: Thu May 12 21:46:56 2011 +0200 winecfg: Update Swedish translation. --- programs/winecfg/Sv.rc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/winecfg/Sv.rc b/programs/winecfg/Sv.rc index 10fc98a..cffc415 100644 --- a/programs/winecfg/Sv.rc +++ b/programs/winecfg/Sv.rc @@ -62,7 +62,7 @@ STYLE WS_CHILD | WS_DISABLED FONT 8, "MS Shell Dlg" BEGIN GROUPBOX " F�nsterinst�llningar ",IDC_STATIC,8,4,244,84 - CONTROL "Automatically capture the &mouse in full-screen windows",IDC_FULLSCREEN_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,8 + CONTROL "F�nga &musen automatiskt i fullsk�rmsf�nster",IDC_FULLSCREEN_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,8 CONTROL "Till�t f�nsterhanteraren att &dekorera f�nstren",IDC_ENABLE_DECORATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,32,230,8 CONTROL "Till�t &f�nsterhanteraren att styra f�nstren",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,44,230,8 CONTROL "Emulera ett virtuellt skriv&bord",IDC_ENABLE_DESKTOP,"Button",
1
0
0
0
Nikolay Sivov : comctl32/tab: Send NM_RCLICK on WM_RBUTTONUP.
by Alexandre Julliard
13 May '11
13 May '11
Module: wine Branch: master Commit: 4daa5459f48a8b1f2f9a9818cdd775280ede4f01 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4daa5459f48a8b1f2f9a9818c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri May 13 00:46:39 2011 +0400 comctl32/tab: Send NM_RCLICK on WM_RBUTTONUP. --- dlls/comctl32/tab.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index bd34358..0424f7f 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -707,7 +707,7 @@ TAB_LButtonUp (const TAB_INFO *infoPtr) } static inline LRESULT -TAB_RButtonDown (const TAB_INFO *infoPtr) +TAB_RButtonUp (const TAB_INFO *infoPtr) { TAB_SendSimpleNotify(infoPtr, NM_RCLICK); return 0; @@ -3427,8 +3427,8 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_NOTIFY: return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, wParam, lParam); - case WM_RBUTTONDOWN: - return TAB_RButtonDown (infoPtr); + case WM_RBUTTONUP: + return TAB_RButtonUp (infoPtr); case WM_MOUSEMOVE: return TAB_MouseMove (infoPtr, wParam, lParam);
1
0
0
0
Frédéric Delanoy : kernel32/tests: Fix typo.
by Alexandre Julliard
13 May '11
13 May '11
Module: wine Branch: master Commit: f5304c4f73508adddb05e881fadb9a27d250795d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f5304c4f73508adddb05e881f…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Thu May 12 22:10:52 2011 +0200 kernel32/tests: Fix typo. --- dlls/kernel32/tests/locale.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 19f630b..1268c1d 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -1348,7 +1348,7 @@ static void test_CompareStringA(void) /* \xB9 character lies between a and b */ ret = CompareStringA(lcid, 0, "a", 1, "\xB9", 1); - todo_wine ok(ret == CSTR_LESS_THAN, "\'\\xB9\' character should be grater than \'a\'\n"); + todo_wine ok(ret == CSTR_LESS_THAN, "\'\\xB9\' character should be greater than \'a\'\n"); ret = CompareStringA(lcid, 0, "\xB9", 1, "b", 1); ok(ret == CSTR_LESS_THAN, "\'\\xB9\' character should be smaller than \'b\'\n"); }
1
0
0
0
Aric Stewart : usp10: Implementation of ScriptPlaceOpenType.
by Alexandre Julliard
13 May '11
13 May '11
Module: wine Branch: master Commit: e3ed47bf952aabef9d50dc649eb243d91cc2e060 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e3ed47bf952aabef9d50dc649…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Thu May 12 13:57:32 2011 -0500 usp10: Implementation of ScriptPlaceOpenType. --- dlls/usp10/usp10.c | 93 +++++++++++++++++++++++++++++++++++++++++++----- dlls/usp10/usp10.spec | 2 +- 2 files changed, 84 insertions(+), 11 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index e7bda77..da4fbb1 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1662,17 +1662,26 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, } /*********************************************************************** - * ScriptPlace (USP10.@) + * ScriptPlaceOpenType (USP10.@) * * Produce advance widths for a run. * * PARAMS * hdc [I] Device context. * psc [I/O] Opaque pointer to a script cache. - * pwGlyphs [I] Array of glyphs. - * cGlyphs [I] Number of glyphs in pwGlyphs. - * psva [I] Array of visual attributes. * psa [I/O] String analysis. + * tagScript [I] The OpenType tag for the Script + * tagLangSys [I] The OpenType tag for the Language + * rcRangeChars[I] Array of Character counts in each range + * rpRangeProperties [I] Array of TEXTRANGE_PROPERTIES structures + * cRanges [I] Count of ranges + * pwcChars [I] Array of characters specifying the run. + * pwLogClust [I] Array of logical cluster info + * pCharProps [I] Array of character property values + * cChars [I] Number of characters in pwcChars. + * pwGlyphs [I] Array of glyphs. + * pGlyphProps [I] Array of attributes for the retrieved glyphs + * cGlyphs [I] Count of Glyphs * piAdvance [O] Array of advance widths. * pGoffset [O] Glyph offsets. * pABC [O] Combined ABC width. @@ -1681,20 +1690,37 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, * Success: S_OK * Failure: Non-zero HRESULT value. */ -HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, - int cGlyphs, const SCRIPT_VISATTR *psva, - SCRIPT_ANALYSIS *psa, int *piAdvance, GOFFSET *pGoffset, ABC *pABC ) + +HRESULT WINAPI ScriptPlaceOpenType( HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, + OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, + int *rcRangeChars, TEXTRANGE_PROPERTIES **rpRangeProperties, + int cRanges, const WCHAR *pwcChars, WORD *pwLogClust, + SCRIPT_CHARPROP *pCharProps, int cChars, + const WORD *pwGlyphs, const SCRIPT_GLYPHPROP *pGlyphProps, + int cGlyphs, int *piAdvance, + GOFFSET *pGoffset, ABC *pABC +) { HRESULT hr; int i; - TRACE("(%p, %p, %p, %d, %p, %p, %p, %p, %p)\n", hdc, psc, pwGlyphs, cGlyphs, psva, psa, - piAdvance, pGoffset, pABC); + TRACE("(%p, %p, %p, %s, %s, %p, %p, %d, %s, %p, %p, %d, %p, %p, %d, %p %p %p)\n", + hdc, psc, psa, + debugstr_an((char*)&tagScript,4), debugstr_an((char*)&tagLangSys,4), + rcRangeChars, rpRangeProperties, cRanges, debugstr_wn(pwcChars, cChars), + pwLogClust, pCharProps, cChars, pwGlyphs, pGlyphProps, cGlyphs, piAdvance, + pGoffset, pABC); - if (!psva) return E_INVALIDARG; + if (!pGlyphProps) return E_INVALIDARG; if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr; if (!pGoffset) return E_FAIL; + if (cRanges) + FIXME("Ranges not supported yet\n"); + + ((ScriptCache *)*psc)->userScript = tagScript; + ((ScriptCache *)*psc)->userLang = tagLangSys; + if (pABC) memset(pABC, 0, sizeof(ABC)); for (i = 0; i < cGlyphs; i++) { @@ -1731,6 +1757,53 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, } /*********************************************************************** + * ScriptPlace (USP10.@) + * + * Produce advance widths for a run. + * + * PARAMS + * hdc [I] Device context. + * psc [I/O] Opaque pointer to a script cache. + * pwGlyphs [I] Array of glyphs. + * cGlyphs [I] Number of glyphs in pwGlyphs. + * psva [I] Array of visual attributes. + * psa [I/O] String analysis. + * piAdvance [O] Array of advance widths. + * pGoffset [O] Glyph offsets. + * pABC [O] Combined ABC width. + * + * RETURNS + * Success: S_OK + * Failure: Non-zero HRESULT value. + */ +HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, + int cGlyphs, const SCRIPT_VISATTR *psva, + SCRIPT_ANALYSIS *psa, int *piAdvance, GOFFSET *pGoffset, ABC *pABC ) +{ + HRESULT hr; + SCRIPT_GLYPHPROP *glyphProps; + int i; + + TRACE("(%p, %p, %p, %d, %p, %p, %p, %p, %p)\n", hdc, psc, pwGlyphs, cGlyphs, psva, psa, + piAdvance, pGoffset, pABC); + + if (!psva) return E_INVALIDARG; + if (!pGoffset) return E_FAIL; + + glyphProps = heap_alloc(sizeof(SCRIPT_GLYPHPROP)*cGlyphs); + if (!glyphProps) return E_OUTOFMEMORY; + + for (i = 0; i < cGlyphs; i++) + glyphProps[i].sva = psva[i]; + + hr = ScriptPlaceOpenType(hdc, psc, psa, scriptInformation[psa->eScript].scriptTag, 0, NULL, NULL, 0, NULL, NULL, NULL, 0, pwGlyphs, glyphProps, cGlyphs, piAdvance, pGoffset, pABC); + + heap_free(glyphProps); + + return hr; +} + +/*********************************************************************** * ScriptGetCMap (USP10.@) * * Retrieve glyph indices. diff --git a/dlls/usp10/usp10.spec b/dlls/usp10/usp10.spec index bc2eb73..05269c5 100644 --- a/dlls/usp10/usp10.spec +++ b/dlls/usp10/usp10.spec @@ -20,7 +20,7 @@ @ stdcall ScriptJustify(ptr ptr long long long ptr) @ stdcall ScriptLayout(long ptr ptr ptr) @ stdcall ScriptPlace(ptr ptr ptr long ptr ptr ptr ptr ptr) -@ stub ScriptPlaceOpenType +@ stdcall ScriptPlaceOpenType(ptr ptr ptr long long ptr ptr long wstr ptr ptr long ptr ptr long ptr ptr ptr) @ stub ScriptPositionSingleGlyph @ stdcall ScriptRecordDigitSubstitution(ptr ptr) @ stdcall ScriptShape(ptr ptr ptr long long ptr ptr ptr ptr ptr)
1
0
0
0
Aric Stewart : usp10: Implementation of ScriptShapeOpenType.
by Alexandre Julliard
13 May '11
13 May '11
Module: wine Branch: master Commit: 3ad7822d8560a39e024646b20f176f798652d118 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3ad7822d8560a39e024646b20…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Thu May 12 13:57:26 2011 -0500 usp10: Implementation of ScriptShapeOpenType. --- dlls/usp10/shape.c | 12 ++++- dlls/usp10/usp10.c | 111 ++++++++++++++++++++++++++++++++++++------- dlls/usp10/usp10.spec | 2 +- dlls/usp10/usp10_internal.h | 3 + include/usp10.h | 12 +++++ 5 files changed, 119 insertions(+), 21 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index dff1f4f..b718190 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -762,10 +762,13 @@ static INT GSUB_apply_feature(const GSUB_Header * header, const GSUB_Feature* fe return out_index; } -static const char* get_opentype_script(HDC hdc, SCRIPT_ANALYSIS *psa) +static const char* get_opentype_script(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc) { UINT charset; + if (psc->userScript != 0) + return (char*)&psc->userScript; + if (ShapingData[psa->eScript].otTag[0] != 0) return ShapingData[psa->eScript].otTag; @@ -810,10 +813,13 @@ static LPCVOID load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc const GSUB_Script *script; const GSUB_LangSys *language; - script = GSUB_get_script_table(psc->GSUB_Table, get_opentype_script(hdc,psa)); + script = GSUB_get_script_table(psc->GSUB_Table, get_opentype_script(hdc,psa,psc)); if (script) { - language = GSUB_get_lang_table(script, "xxxx"); /* Need to get Lang tag */ + if (psc->userLang != 0) + language = GSUB_get_lang_table(script,(char*)&psc->userLang); + else + language = GSUB_get_lang_table(script, "xxxx"); /* Need to get Lang tag */ if (language) feature = GSUB_get_feature(psc->GSUB_Table, language, feat); } diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index d818015..e7bda77 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1477,61 +1477,84 @@ HRESULT WINAPI ScriptIsComplex(const WCHAR *chars, int len, DWORD flag) } /*********************************************************************** - * ScriptShape (USP10.@) + * ScriptShapeOpenType (USP10.@) * * Produce glyphs and visual attributes for a run. * * PARAMS * hdc [I] Device context. * psc [I/O] Opaque pointer to a script cache. + * psa [I/O] Script analysis. + * tagScript [I] The OpenType tag for the Script + * tagLangSys [I] The OpenType tag for the Language + * rcRangeChars[I] Array of Character counts in each range + * rpRangeProperties [I] Array of TEXTRANGE_PROPERTIES structures + * cRanges [I] Count of ranges * pwcChars [I] Array of characters specifying the run. * cChars [I] Number of characters in pwcChars. * cMaxGlyphs [I] Length of pwOutGlyphs. - * psa [I/O] Script analysis. - * pwOutGlyphs [O] Array of glyphs. * pwLogClust [O] Array of logical cluster info. - * psva [O] Array of visual attributes. + * pCharProps [O] Array of character property values + * pwOutGlyphs [O] Array of glyphs. + * pOutGlyphProps [O] Array of attributes for the retrieved glyphs * pcGlyphs [O] Number of glyphs returned. * * RETURNS * Success: S_OK * Failure: Non-zero HRESULT value. */ -HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, - int cChars, int cMaxGlyphs, - SCRIPT_ANALYSIS *psa, WORD *pwOutGlyphs, WORD *pwLogClust, - SCRIPT_VISATTR *psva, int *pcGlyphs) +HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc, + SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, + OPENTYPE_TAG tagLangSys, int *rcRangeChars, + TEXTRANGE_PROPERTIES **rpRangeProperties, + int cRanges, const WCHAR *pwcChars, int cChars, + int cMaxGlyphs, WORD *pwLogClust, + SCRIPT_CHARPROP *pCharProps, WORD *pwOutGlyphs, + SCRIPT_GLYPHPROP *pOutGlyphProps, int *pcGlyphs) { HRESULT hr; unsigned int i; BOOL rtl; - TRACE("(%p, %p, %s, %d, %d, %p, %p, %p, %p, %p)\n", hdc, psc, debugstr_wn(pwcChars, cChars), - cChars, cMaxGlyphs, psa, pwOutGlyphs, pwLogClust, psva, pcGlyphs); + TRACE("(%p, %p, %p, %s, %s, %p, %p, %d, %s, %d, %d, %p, %p, %p, %p, %p )\n", + hdc, psc, psa, + debugstr_an((char*)&tagScript,4), debugstr_an((char*)&tagLangSys,4), + rcRangeChars, rpRangeProperties, cRanges, debugstr_wn(pwcChars, cChars), + cChars, cMaxGlyphs, pwLogClust, pCharProps, pwOutGlyphs, pOutGlyphProps, pcGlyphs); if (psa) TRACE("psa values: %d, %d, %d, %d, %d, %d, %d\n", psa->eScript, psa->fRTL, psa->fLayoutRTL, psa->fLinkBefore, psa->fLinkAfter, psa->fLogicalOrder, psa->fNoGlyphIndex); - if (!psva || !pcGlyphs) return E_INVALIDARG; + if (!pOutGlyphProps || !pcGlyphs || !pCharProps) return E_INVALIDARG; if (cChars > cMaxGlyphs) return E_OUTOFMEMORY; + + if (cRanges) + FIXME("Ranges not supported yet\n"); + rtl = (!psa->fLogicalOrder && psa->fRTL); *pcGlyphs = cChars; if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr; if (!pwLogClust) return E_FAIL; + ((ScriptCache *)*psc)->userScript = tagScript; + ((ScriptCache *)*psc)->userLang = tagLangSys; + /* Initialize a SCRIPT_VISATTR and LogClust for each char in this run */ for (i = 0; i < cChars; i++) { int idx = i; if (rtl) idx = cChars - 1 - i; /* FIXME: set to better values */ - psva[i].uJustification = (pwcChars[idx] == ' ') ? SCRIPT_JUSTIFY_BLANK : SCRIPT_JUSTIFY_CHARACTER; - psva[i].fClusterStart = 1; - psva[i].fDiacritic = 0; - psva[i].fZeroWidth = 0; - psva[i].fReserved = 0; - psva[i].fShapeReserved = 0; + pOutGlyphProps[i].sva.uJustification = (pwcChars[idx] == ' ') ? SCRIPT_JUSTIFY_BLANK : SCRIPT_JUSTIFY_CHARACTER; + pOutGlyphProps[i].sva.fClusterStart = 1; + pOutGlyphProps[i].sva.fDiacritic = 0; + pOutGlyphProps[i].sva.fZeroWidth = 0; + pOutGlyphProps[i].sva.fReserved = 0; + pOutGlyphProps[i].sva.fShapeReserved = 0; + + /* FIXME: have the shaping engine set this */ + pCharProps[i].fCanGlyphAlone = 1; pwLogClust[i] = idx; } @@ -1584,6 +1607,60 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, return S_OK; } + +/*********************************************************************** + * ScriptShape (USP10.@) + * + * Produce glyphs and visual attributes for a run. + * + * PARAMS + * hdc [I] Device context. + * psc [I/O] Opaque pointer to a script cache. + * pwcChars [I] Array of characters specifying the run. + * cChars [I] Number of characters in pwcChars. + * cMaxGlyphs [I] Length of pwOutGlyphs. + * psa [I/O] Script analysis. + * pwOutGlyphs [O] Array of glyphs. + * pwLogClust [O] Array of logical cluster info. + * psva [O] Array of visual attributes. + * pcGlyphs [O] Number of glyphs returned. + * + * RETURNS + * Success: S_OK + * Failure: Non-zero HRESULT value. + */ +HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, + int cChars, int cMaxGlyphs, + SCRIPT_ANALYSIS *psa, WORD *pwOutGlyphs, WORD *pwLogClust, + SCRIPT_VISATTR *psva, int *pcGlyphs) +{ + HRESULT hr; + int i; + SCRIPT_CHARPROP *charProps; + SCRIPT_GLYPHPROP *glyphProps; + + if (!psva || !pcGlyphs) return E_INVALIDARG; + if (cChars > cMaxGlyphs) return E_OUTOFMEMORY; + + charProps = heap_alloc_zero(sizeof(SCRIPT_CHARPROP)*cChars); + if (!charProps) return E_OUTOFMEMORY; + glyphProps = heap_alloc_zero(sizeof(SCRIPT_GLYPHPROP)*cMaxGlyphs); + if (!glyphProps) return E_OUTOFMEMORY; + + hr = ScriptShapeOpenType(hdc, psc, psa, scriptInformation[psa->eScript].scriptTag, 0, NULL, NULL, 0, pwcChars, cChars, cMaxGlyphs, pwLogClust, charProps, pwOutGlyphs, glyphProps, pcGlyphs); + + if (SUCCEEDED(hr)) + { + for (i = 0; i < *pcGlyphs; i++) + psva[i] = glyphProps[i].sva; + } + + heap_free(charProps); + heap_free(glyphProps); + + return hr; +} + /*********************************************************************** * ScriptPlace (USP10.@) * diff --git a/dlls/usp10/usp10.spec b/dlls/usp10/usp10.spec index 21e7c31..bc2eb73 100644 --- a/dlls/usp10/usp10.spec +++ b/dlls/usp10/usp10.spec @@ -24,7 +24,7 @@ @ stub ScriptPositionSingleGlyph @ stdcall ScriptRecordDigitSubstitution(ptr ptr) @ stdcall ScriptShape(ptr ptr ptr long long ptr ptr ptr ptr ptr) -@ stub ScriptShapeOpenType +@ stdcall ScriptShapeOpenType(ptr ptr ptr long long ptr ptr long wstr long long ptr ptr ptr ptr ptr) @ stdcall ScriptStringAnalyse(ptr ptr long long long long long ptr ptr ptr ptr ptr ptr) @ stdcall ScriptStringCPtoX(ptr long long ptr) @ stdcall ScriptStringFree(ptr) diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index fae1066..a61e56e 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -69,6 +69,9 @@ typedef struct { LPVOID GSUB_Table; INT feature_count; LoadedFeature *features; + + OPENTYPE_TAG userScript; + OPENTYPE_TAG userLang; } ScriptCache; #define odd(x) ((x) & 1) diff --git a/include/usp10.h b/include/usp10.h index d947e6e..1940176 100644 --- a/include/usp10.h +++ b/include/usp10.h @@ -210,6 +210,18 @@ typedef struct tagOPENTYPE_FEATURE_RECORD LONG lParameter; } OPENTYPE_FEATURE_RECORD; +typedef struct tagSCRIPT_GLYPHPROP +{ + SCRIPT_VISATTR sva; + WORD reserved; +} SCRIPT_GLYPHPROP; + +typedef struct tagSCRIPT_CHARPROP +{ + WORD fCanGlyphAlone :1; + WORD reserved :15; +} SCRIPT_CHARPROP; + typedef struct tagTEXTRANGE_PROPERTIES { OPENTYPE_FEATURE_RECORD *potfRecords;
1
0
0
0
← Newer
1
...
56
57
58
59
60
61
62
...
95
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
92
93
94
95
Results per page:
10
25
50
100
200