Xpra: Ticket #338: some toolkits specify a max window size of 32767 for infinity causing win32 client to misbehave (no maximize button)

The XSizeHints specification states that the PMinSize and PMaxSize attributes are ints. Unfortunately, although on MS Windows these attributes are stored in the POINT structure as longs, it seems that in reality the useful range is smaller and some toolkits will use signed or unsigned shorts to store those values. Note: we are not the first to hit this issue

This causes problems when a toolkit uses the wrong value (uses a short instead of an int) on *nix: we grab the value as an int (since this is what it is) and we then pass that on to the windows client as a valid maximum size, then the windows UI decides to hide the maximize button since a valid maximum size has been supplied... Note: Lazarus is one such tool.

This problem has been solved in r3392 by changing the _sanitize_size_hints function to ignore values greater than 2**15-1 (32767) instead of 2**32-1. (this is a massive change in allowed size range)

I am recording this ticket so that if we ever find problems with well behaved X11 application trying (and failing) to create windows bigger than this new low limit, then we will know that this bug is caused by MS Windows (not for the first time we end up making X11 code worse to accomodate crappy win32 apis..)

Fri, 17 May 2013 07:53:41 GMT - Antoine Martin: status changed; resolution set

Already fixed, see also #263

in v0.9.x as of r3408

Thu, 11 Jul 2013 15:02:13 GMT - Antoine Martin: status, description changed; resolution deleted

I knew this was going to come back and bite us: see r3827

Please file a bug with your toolkit so we can remove this nasty workaround.

Thu, 11 Jul 2013 15:02:25 GMT - Antoine Martin: owner, status changed

Sat, 10 Aug 2013 05:51:37 GMT - Antoine Martin: owner changed

(correct assignee spelling)

Fri, 21 Feb 2014 13:45:17 GMT - Antoine Martin: status changed; resolution set

Never mind, there are other problems with windows bigger than 215, so let's just live with the ugly workaround.

Sat, 23 Jan 2021 04:52:05 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/338