Groups | Search | Server Info | Login | Register


Groups > comp.windows.x > #595

Re: proper way to get Shell widget resized calls?

From Winston <wbe@UBEBLOCK.psr.com.invalid>
Newsgroups comp.windows.x
Subject Re: proper way to get Shell widget resized calls?
Date 2025-07-15 00:34 -0400
Organization A noiseless patient Spider
Message-ID <yd4ivevzq1.fsf@UBEblock.psr.com> (permalink)
References <yd8qkrwxrm.fsf@UBEblock.psr.com> <1053v4k$3kipi$7@dont-email.me>

Show all headers | View raw


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

Back to comp.windows.x | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

proper way to get Shell widget resized calls? Winston <wbe@UBEBLOCK.psr.com.invalid> - 2025-07-13 18:07 -0400
  Re: proper way to get Shell widget resized calls? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-07-14 22:08 +0000
    Re: proper way to get Shell widget resized calls? Winston <wbe@UBEBLOCK.psr.com.invalid> - 2025-07-15 00:34 -0400
      Re: proper way to get Shell widget resized calls? Winston <wbe@UBEBLOCK.psr.com.invalid> - 2025-07-15 02:19 -0400
      Re: proper way to get Shell widget resized calls? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-07-16 07:11 +0000
  Re: proper way to get Shell widget resized calls? Winston <wbe@UBEBLOCK.psr.com.invalid> - 2025-08-02 10:38 -0400
    Re: proper way to get Shell widget resized calls? Winston <wbe@UBEBLOCK.psr.com.invalid> - 2025-08-04 13:09 -0400
      Re: proper way to get Shell widget resized calls? Winston <wbe@UBEBLOCK.psr.com.invalid> - 2025-08-04 15:46 -0400

csiph-web