From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Fri, 4 Jul 2008 01:25:48 +0900 From: underspecified To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: <13426df10807030905v5c0c382ex504d09cba8783711@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <509071940807030738r4dae6987j57b3db92bf7606bf@mail.gmail.com> <14ec7b180807030757u32f499ebvb918df63fdaf1c48@mail.gmail.com> <5d375e920807030813n49aef88gb26666b70419e159@mail.gmail.com> <14ec7b180807030830o7823b00fre2e1ef29e41b1543@mail.gmail.com> <5d375e920807030855m52601bbeie0b0b23879a164d9@mail.gmail.com> <13426df10807030905v5c0c382ex504d09cba8783711@mail.gmail.com> Subject: Re: [9fans] 9vx.OSX bug: resize on second display causes window to go wrong Topicbox-Message-UUID: d941220a-ead3-11e9-9d60-3106f5b1d025 Greetings, Thanks for finding that snippet, andrey :-) I was about to search the acme-sac code for it so I could post a patch. After looking through the 9vx code, it looks like russ is handling memory allocation for the screen a little differently than acme-sac (and possibly drawterm). In acme-sac, I: * calculate the maximum possible screen size using the function andrey posted * allocate a giant block of memory to handle this size once in screeninit() In 9vx it looks like russ is: * calculating the new window size on resize event * dynamically reallocating the necessary memory for each resize Perhaps this has something to do with andrey's problems? --underspecified P.S. 9vx will only go into fullscreen on the main display. The follow fix should work, but I can't test it now, as I am without an external monitor. diff -r ca5b26cbe43a src/9vx/osx/screen.c --- a/src/9vx/osx/screen.c Tue Jul 01 17:27:41 2008 -0400 +++ b/src/9vx/osx/screen.c Fri Jul 04 01:20:59 2008 +0900 @@ -513,7 +511,9 @@ }else{ HideWindow(osx.window); oldwindow = osx.window; - BeginFullScreen(&restore, 0, 0, 0, &osx.window, 0, 0); + GDHandle device; + GetWindowGreatestAreaDevice(&osx.window, kWindowTitleBarRgn, &device, NULL); + BeginFullScreen(&fullScreenRestore, device, 0, 0, &osx.window, 0, 0); osx.isfullscreen = 1; osx.fullscreentime = msec(); On Fri, Jul 4, 2008 at 1:05 AM, ron minnich wrote: > On Thu, Jul 3, 2008 at 8:55 AM, Uriel wrote: >> If there was a single codebase shared >> across projects none of this would be an issue at all. > > you are right but it's a hard problem, we're all tight for time, so > the only fix is for somebody to step up and do it. > > But your question, 'wouldn't it be better to have one thing to do all > this different stuff', is certainly answered "probably". > > ron > >