Signed-off-by: Gabriel Ivăncescu [email protected] ---
Currently the early break happens only with single-column listboxes. This makes it so that it works properly with multi-column listboxes as well.
dlls/comctl32/listbox.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index bd9cffd..69fa56a 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -1149,6 +1149,7 @@ static LRESULT LISTBOX_Paint( LB_DESCR *descr, HDC hdc ) rect.right += descr->column_width; rect.top = 0; col_pos = descr->page_size - 1; + if (rect.left >= descr->width) break; } else {
Signed-off-by: Gabriel Ivăncescu [email protected] --- dlls/user32/listbox.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 95621b8..52f01a7 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -1191,6 +1191,7 @@ static LRESULT LISTBOX_Paint( LB_DESCR *descr, HDC hdc ) rect.right += descr->column_width; rect.top = 0; col_pos = descr->page_size - 1; + if (rect.left >= descr->width) break; } else {
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=51299
Your paranoid android.
=== debian9 (32 bit report) ===
user32: msg.c:8713: Test failed: WaitForSingleObject failed 102 msg.c:8719: Test failed: destroy child on thread exit: 0: the msg 0x0082 was expected, but got msg 0x000f instead msg.c:8719: Test failed: destroy child on thread exit: 1: the msg 0x000f was expected, but got msg 0x0014 instead msg.c:8719: Test failed: destroy child on thread exit: 2: the msg sequence is not complete: expected 0014 - actual 0000
=== debian9 (32 bit Chinese:China report) ===
user32: win.c:10097: Test failed: GetForegroundWindow() = 00000000
=== debian9 (32 bit WoW report) ===
user32: msg.c:8713: Test failed: WaitForSingleObject failed 102 msg.c:8719: Test failed: destroy child on thread exit: 0: the msg 0x0082 was expected, but got msg 0x000f instead msg.c:8719: Test failed: destroy child on thread exit: 1: the msg 0x000f was expected, but got msg 0x0014 instead msg.c:8719: Test failed: destroy child on thread exit: 2: the msg sequence is not complete: expected 0014 - actual 0000
Signed-off-by: Nikolay Sivov [email protected]
On 4/22/19 3:32 PM, Gabriel Ivăncescu wrote:
Signed-off-by: Gabriel Ivăncescu [email protected]
Currently the early break happens only with single-column listboxes. This makes it so that it works properly with multi-column listboxes as well.
dlls/comctl32/listbox.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index bd9cffd..69fa56a 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -1149,6 +1149,7 @@ static LRESULT LISTBOX_Paint( LB_DESCR *descr, HDC hdc ) rect.right += descr->column_width; rect.top = 0; col_pos = descr->page_size - 1;
if (rect.left >= descr->width) break; } else {
How does this work for RTL case?Existing optimization for single column case is testing in vertical direction, so it's not the same.
On 5/20/19 3:24 PM, Nikolay Sivov wrote:
On 4/22/19 3:32 PM, Gabriel Ivăncescu wrote:
Signed-off-by: Gabriel Ivăncescu [email protected]
Currently the early break happens only with single-column listboxes. This makes it so that it works properly with multi-column listboxes as well.
dlls/comctl32/listbox.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index bd9cffd..69fa56a 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -1149,6 +1149,7 @@ static LRESULT LISTBOX_Paint( LB_DESCR *descr, HDC hdc ) rect.right += descr->column_width; rect.top = 0; col_pos = descr->page_size - 1; + if (rect.left >= descr->width) break; } else {
How does this work for RTL case?Existing optimization for single column case is testing in vertical direction, so it's not the same.
Hi Nikolay,
I think it works fine since the coordinates are mirrored (i.e. increasing means going left). Because the code already does rect.right += descr->column_width; just above that, so that line would be wrong already if it didn't work in RTL. (it would paint items in the wrong order)
On 5/20/19 3:29 PM, Gabriel Ivăncescu wrote:
On 5/20/19 3:24 PM, Nikolay Sivov wrote:
On 4/22/19 3:32 PM, Gabriel Ivăncescu wrote:
Signed-off-by: Gabriel Ivăncescu [email protected]
Currently the early break happens only with single-column listboxes. This makes it so that it works properly with multi-column listboxes as well.
dlls/comctl32/listbox.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index bd9cffd..69fa56a 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -1149,6 +1149,7 @@ static LRESULT LISTBOX_Paint( LB_DESCR *descr, HDC hdc ) rect.right += descr->column_width; rect.top = 0; col_pos = descr->page_size - 1; + if (rect.left >= descr->width) break; } else {
How does this work for RTL case?Existing optimization for single column case is testing in vertical direction, so it's not the same.
Hi Nikolay,
I think it works fine since the coordinates are mirrored (i.e. increasing means going left). Because the code already does rect.right += descr->column_width; just above that, so that line would be wrong already if it didn't work in RTL. (it would paint items in the wrong order)
Fair enough. I tried it briefly before replying and it showed some artifacts when resizing, that does not happen in LTR. Turns out it glitches without your patch as well.