[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squeak-dev
Subject:    [squeak-dev] DisplayHostWindow>>hostWindowExtent: Discrepancy -- Mac vs. Linux
From:       Jim Rosenberg <jr () amanue ! com>
Date:       2024-03-11 9:54:01
Message-ID: 20240311055401.1965307abfbcef097103ddfc () amanue ! com
[Download RAW message or body]

I have a class of my own called FrameStackCard which is a subclass of
PasteUpMorph. FrameStackCard has a class method called resizeHostWindow
which is intended to resize the OS desktop window in which Squeak is
running to the size of the top-most FrameStackCard. The exact code is:

resizeHostWindow

	Project current world submorphs do: [ :m |
		(m isKindOf: FrameStackCard) ifTrue: [
			^ DisplayHostWindow hostWindowExtent: (m extent)
		]
	]

On Linux (specifically Debian 10, KDE window manager) running VM from
Squeak 6.0 on a Squeak 5.3 image, this works perfectly. The top-most card
has origin (0@0), the window contents is sized exactly to the top-most
card's extent, everything exactly visible.

On MacOS (specifically Sonoma 14.3.1) I'm getting "similar" behavior
EXCEPT that the window size seems to *include* the MacOS window title bar,
whereas on Linux the window size seems to be just the *contents* of the
window, without the title bar. The Linux behavior is what I want to
happen. On MacOS, a sliver at the bottom is not visible. So the semantics
don't quite agree.

I haven't had a chance to test this on Windows yet.

Is there something I can do to get the Linux behavior on MacOS?

-Thanks in advance, Jim

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic