[PATCH]winecfg: Double click in dlls list to edit overides. (try4)

Hao Peng penghao at linuxdeepin.com
Tue Jun 30 04:18:19 CDT 2015


Hi, Nikolay Sivov


Thanks for your review. 
I have tested so many times and I'm pretty sure that if user double click on the blank area of the list, 
we will always receive a CBN_CLICK message. So I  have to use LB_ITEMFROMPOINT to know 
whether a use really clicked on a list item, Otherwise it's wacky that user click on the blank area and 
the edit window pops out.
 
------------------ Original ------------------
From:  "Nikolay Sivov"<bunglehead at gmail.com>;
Date:  Mon, Jun 29, 2015 04:09 AM
To:  "wine-devel"<wine-devel at winehq.org>; 
Cc:  "Hao Peng"<penghao at linuxdeepin.com>; 
Subject:  Re: [PATCH]winecfg: Double click in dlls list to edit overides. (try4)

 
On 29.06.2015 12:35, Hao Peng wrote:
> Add a feature to winecfg. User can double click in dlls list to edit
> overides of selected item.
>
> superseded all earlier patches.
>
> ---
>   programs/winecfg/libraries.c | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
>


> +                case CBN_DBLCLK:
> +                        if (LOWORD(wParam) == IDC_DLLS_LIST)
> +                        {
> +                            int index;
> +                            POINT p;
> +                            if (GetCursorPos(&p) && ScreenToClient((HWND)lParam, &p))
> +                            {
> +                                index = SendDlgItemMessageW(hDlg, IDC_DLLS_LIST,
> +                                        LB_ITEMFROMPOINT, 0, MAKELPARAM(p.x, p.y));
> +                                if (!HIWORD(index))
> +                                    on_edit_click(hDlg);
> +                            }
> +                        }
> +                    break;

Correct me if I'm wrong, but I don't think you get CBN_DBLCLK unless 
clicked on an item. Quick test with ControlSpy on Windows confirms that. 
And by the time you get CBN_DBLCLK something is always selected I think, 
which makes all that cursor complexity redundant.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150630/ef7219c1/attachment-0001.html>


More information about the wine-devel mailing list