From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 3 Nov 2015 16:40:19 -0800 Message-ID: From: Skip Tavakkolian To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=001a11457f3045cea70523ac4177 Subject: Re: [9fans] Windows drawterm screen size Topicbox-Message-UUID: 7570886e-ead9-11e9-9d60-3106f5b1d025 --001a11457f3045cea70523ac4177 Content-Type: text/plain; charset=UTF-8 I don't have a windows box handy; if I did I would try: in gui-win32/screen.c change the calls to GetDeviceCaps to SystemParametersInfo with SPI_GETWORKAREA parameter. something like: RECT ds; // size of work area in primary display if( SystemParametersInfo(SPI_GETWORKAREA, 0, &ds, 0) ){ dx = ds.right - ds.left; dy = ds.bottom - ds.top; } FYI: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx On Tue, Nov 3, 2015 at 7:51 AM, wrote: > The Windows drawterm is pretty naive about screen > sizes: it doesn't take into account window size, > the stupid title bar, or multiple monitors. Inferno > has dealt with at least some of this. Does anyone > have a drawterm that deals with this better? Or has > anyone tried and run into issues? > > --001a11457f3045cea70523ac4177 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I don't have a windows box handy; if I did I would try= :

in gui-win32/screen.c change the calls to GetDeviceCap= s to=C2=A0SystemParametersInfo with SPI_GETWORKAREA parameter. something li= ke:

RECT ds; // size of work area in primary displ= ay
if( SystemParametersInfo(SPI_GETWORKAREA, 0, &ds, 0) ){
=C2=A0 dx =3D ds.right - ds.left;
=C2=A0 dy =3D ds.bottom= - ds.top;
}

FYI:
https://msdn.microsoft.com/en-us/library/windows/desktop/m= s724947(v=3Dvs.85).aspx

On Tue, Nov 3, 2015 at 7:51 AM, <a@9srv.ne= t> wrote:
The Windows drawt= erm is pretty naive about screen
sizes: it doesn't take into account window size,
the stupid title bar, or multiple monitors. Inferno
has dealt with at least some of this. Does anyone
have a drawterm that deals with this better? Or has
anyone tried and run into issues?


--001a11457f3045cea70523ac4177--