[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Re[2]: WM_REPOSED implementation
On Thu, 2005-12-08 at 22:21 +0100, Ingo Schmidt wrote:
> I am very surprised, that YOU ask this qeustion! Dont you use Linux
> with some GUI? You can do exactly that there.
temporary brain fart.
> This has been so forever! There is no limitation that only height and
> width changed!
Yes, as a user, I actually never move and resize at once, although it is
certainly possible.
As a programmer, I always design code that fails gracefully especially
when its the easiest way to do it. I don't understand why someone would
save the previous window coordinates and then only update some of them
from the information the AES reports, instead of all of them. Its
almost like they were trying to make a bad application since its easier
to make it work right.
I'm lazy so in the past I'd do something like:
case WM_SIZED:
/* Schedule Redraw */
msg[0] = WM_REDRAW;
msg[1] = MyAppID;
/* Rest of message array is unchanged */
appl_write (MyAppID,msg[2],msg);
/* Fall-through */
case WM_MOVED:
/* Move or Resize */
wind_set(msg[3],WF_CURRXYWH,
msg[4],msg[5],msg[6],msg[7]);
break;
And that should work just fine for most everything right? Not exactly
sure since its off the top of my head.
As for how I'd do it these days, I'll get back to you later since I'm
still working on the base libs (Linux only now, but should be easily
portable).