It is currently 27 Apr 2024, 23:23
   
Text Size

[confirmed]show_deck() cancel display on windows 10

Report wrong Card behavior to get it fixed.
PLEASE ADD SAVEGAMES TO YOUR TOPIC !

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

[confirmed]show_deck() cancel display on windows 10

Postby Korath » 20 Jun 2019, 13:07

Summary:
show_deck() dialog on Windows 10:

Expected:
Image

Actual:
Image

Version:
Current dev master.

Discussion:
Split from Etherwrought Page card on bottom instead of gy. I'm almost certain it was separately reported elsewhere, but I can't find it.

Short version: WM_NCPAINT is voodoo, even in the context of w32api.

What's going on under the hood here is that the show_deck() dialog lets Windows paint itself as normal, then paints over the dialog's caption (and borders, but that's unimportant) so it can have a minimal, fugly "Cancel"/"Done"/"Into grave?" button in the upper right. This works just fine in Windows 95, 98, XP, and Vista with Aero turned off. In Windows 10 (and likely 8.1, 8, 7, and Vista with Aero on), neither the caption nor borders are drawn.

What I think the problem is is that, at some point, the default handler for WM_NCPAINT began clearing the clipping region. Calling the default handler, and then doing more stuff afterwards like this dialog does, is probably undefined behavior, but WM_NCPAINT is, for all purposes, totally undocumented by Microsoft anyway. Omitting the call to the default handler almost does what we want, but doesn't draw the scroll bar. Passing the default handler a new clipping region - even a copy of the same clipping region as it was getting before - seems to do what we want. So does passing it a null clipping region, which is what I'm currently doing in Shandalar.

Also, the fugly text-only button could use a right margin of 5px or so, to match the left margin on the primary text in the upper left.
Last edited by Aswan jaguar on 25 Jun 2019, 12:13, edited 1 time in total.
Reason: confirmed by travolter
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: show_deck() cancel display on windows 10

Postby travolter » 23 Jun 2019, 10:28

Related bug here casting Mind Bomb. I dont want to discard any card and the cancel button is missing (at least the grey border around the cards works as cancel
Attachments
bug.jpg
travolter
 
Posts: 250
Joined: 26 Mar 2012, 17:56
Has thanked: 4 times
Been thanked: 8 times

Re: show_deck() cancel display on windows 10

Postby Korath » 23 Jun 2019, 13:10

Not a related bug; it's the same bug.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 45 guests


Who is online

In total there are 45 users online :: 0 registered, 0 hidden and 45 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 45 guests

Login Form