| Deutsch English Français Italiano |
|
<yd4ivevzq1.fsf@UBEblock.psr.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: nntp.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Winston <wbe@UBEBLOCK.psr.com.invalid>
Newsgroups: comp.windows.x
Subject: Re: proper way to get Shell widget resized calls?
Date: Tue, 15 Jul 2025 00:34:46 -0400
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <yd4ivevzq1.fsf@UBEblock.psr.com>
References: <yd8qkrwxrm.fsf@UBEblock.psr.com> <1053v4k$3kipi$7@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 15 Jul 2025 06:34:48 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b706214168507dee66b7f088a3c72cf2";
logging-data="4093063"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YdPjj62ejqLxVSE68gwj3"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:iW23mK6GT+wp2mx06f4I5KHTxww=
sha1:Gp3D4vz9tLnUY3XDV0yYPTB7rDk=
Mail-Copies-To: never
I originally asked:
>> However, I'd like to have a Resize function that gets called when the
>> application window resizes, without having to create a widget just to
>> have Resize() called.
to which Lawrence D'Oliveiro <ldo@nz.invalid> kindly replied:
> At the lowest level, there is no fundamental distinction in X11 between a
> ¡°window¡± and a ¡°widget¡±. So if you can attach a handler for a particular
> message to one, you should be able to do the same to the other. Any reason
> why you can¡¯t would be down to limitations of your GUI toolkit, not X11
> itself.
Ah, I wasn't careful enough in my wording: I was using "window" in the
window manager sense, not in the X11 Widget+Window object sense.
Again, I'd like to get notifications (in the generic sense, not
necessarily the strict X11 sense) of resize changes to the application's
Shell widget without having to create another widget just to have a
ClassRec->resize function that I can set. ISTM that something akin to
XtAddCallback (shellwidget, XtNresize, myfunc, cldata)
[but it's not clear that would work: myfunc would need to be an
(XtCallbackProc), not an (XtWidgetProc) which the resize function
normally is; I can adapt myfunc easily enough, but the X11 code that
calls the resize function expects an (XtWidgetProc) [1 argument] and
might not like an (XtCallbackProc) [3 arguments]]
or that adding myfunc to some *_hook list would be the "X11 way" rather
than just setting
applicationShellClassRec.CoreClassPart.resize = myfunction
eliminating the function call that's already there.
Or I may be confused ...
-WBE