On Tue, Aug 26, 2025 at 12:15:16PM +0200 I heard the voice of
Rhialto, and lo! it spake thus:
> 
> That sounds like it would be useful to change
> HandleConfigureRequest() from using the global Event to taking a
> parameter, and if really needed to add a convenience function that
> calls the new version with the global Event.

Probably the shortest path, anyway.  I feel like we probably want to
push it further somehow; most of the actual work is happening in
SetupFrame(); the HCR() in this case is mostly just doing some math
and gravity to set the real x/w/height/width to call SetupFrame()
with.  Feels like someting we're doing a couple places and should
centralize too...

It sure feels like we should have simple move_window() and
resize_window() primitives.  But it seems that doing moves and resizes
are pretty intertwined, so even if we did that it'd just be doing X
stuff twice.  SetupFrame() seems like a lot of unnecessary extra work
here, except that any resizing of the [real] window means resizing etc
all the decorations too, so it's actually not.  And the
workspacemanager stuff...   urg.  So, it's not obvious that there's a
good way to chop SetupFrame() up too much...


>         /*
>          * Event.xany.window is Event.xconfigurerequest.parent, so Tmp_win 
> will
>          * be wrong
>          */
>         Event.xany.window = cre->window;    /* mash parent field */
>         Tmp_win = GetTwmWindow(cre->window);
> 
> Hopefully it calls no functions that also use the global Event directly;
> that would need to be checked.

Yeah.  The Tmp_win bit gives me the willies too.  Though looking at
it, it's pretty much only in the event code, a debug output in
warpring stuff, and in some icon handline stuff in win_utils, so
nothing that feels like it'd get involved here.  That feels like it
can probably be unwound a little too.

Event gets touched a lot more widely.  A 2-minute survey of grep
doesn't immediately throw up any red flags, but yeah, we'll have to
look more closely at them to be sure.


-- 
Matthew Fuller     (MF4839)   |  [email protected]
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.

Reply via email to