[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1209.0. "Help setting Size Hints" by EPIK::J_JOSEPH (Have you seen Jack in the Green) Mon Jul 31 1989 20:26

I've been trying to use XSetSizeHints and/or XSetNormalHints in order to 
bound the minimum size of my window to something rather larger than what the
window manager has in mind.

I'm not having any luck at all.  I've tried both of these calls on both
the window of my toplevel widget and the window of my main window widget to
no avail.  I used XA_WM_SIZE_HINTS in the property field of XSetSizeHints.
I set the flags field of the XSizeHints data structure to be PMinSize.  No
matter what I do, I can not see any effect at all.  

Has anyone had any luck trying to constrain the minimum size of their main
window?

-Jonathan

T.RTitleUserPersonal
Name
DateLines
1209.1Intrinsics Shell bugLEOVAX::TREGGIARITue Aug 01 1989 09:1515
    There is a problem in the Intrinsics shell code.  When the shell
    is first realized, and when the shell is resized at the request
    of its child, it sets the hints property but doesn't bother to
    check to see if the min/max size hints need to be set.
    
    Since you are going around the Intrinsics, it wouldn't know
    anyhow.  What you can do for now (DECwindows V1 AND V2; i.e.
    it's not fixed in V2...) is do an XtSetValues of XtNminWidth
    and XtNminHeight on the shell AFTER it is realized.
    
    You will need to do the XtSetValues again if your widget hierarchy
    ever requests a change in the shell size.
    
    Leo

1209.2It works but I get a warning.EPIK::J_JOSEPHHave you seen Jack in the GreenTue Aug 01 1989 12:076
Your suggestion did work.  Thanks.  But, when I set the min width and height,
I get a warning saying  "X Toolkit Warning: Window Manager is confused".
Do you know how I can avoid getting this message?

-Jonathan

1209.3LEOVAX::TREGGIARITue Aug 01 1989 13:429
> I get a warning saying  "X Toolkit Warning: Window Manager is confused".
> Do you know how I can avoid getting this message?

I don't know what causes that, but I know you won't get it with
DECwindows V2 (because the message was taken out).  I personally don't
know any way around it in V1.

Leo

1209.4Still thereCOMICS::CARLETONRoundabout Basingstoke wayWed Aug 02 1989 07:2811
    
    >    I don't know what causes that, but I know you won't get it with
    >    DECwindows V2 (because the message was taken out).
    
    I beg to differ but I get this message when running more than 3-4
    Xterms together on a VS2000 (ULT3.0 UWS2.0).
    
    Les
    

1209.5Who devised that naming scheme?CASEE::LACROIXObject oriented dog food? No, sorryWed Aug 02 1989 11:1812
    Re .4:

>    >    I don't know what causes that, but I know you won't get it with
>    >    DECwindows V2 (because the message was taken out).
>    
>    I beg to differ but I get this message when running more than 3-4
>    Xterms together on a VS2000 (ULT3.0 UWS2.0).

    UWS2.0 is definetely a "DECwindows V1" environment.

    Denis.

1209.6V1, V2?COMICS::CARLETONRoundabout Basingstoke wayThu Aug 03 1989 13:478
    
    	Apologies, 
    
    	Which version of UWS does DECwindows V1+ appear in?
    
    	Les
    

1209.7need more helpEPIK::J_JOSEPHLiving in the PastureTue Oct 24 1989 15:2023
I got things working fine for my main window.  This is the code segment which 
worked for defining the min and max width and height for resizing the main 
window.

    Arg al[5];

    XtSetArg (al[0], XtNminWidth, main_min_wd);
    XtSetArg (al[1], XtNminHeight, main_min_ht);
    XtSetArg (al[2], XtNmaxWidth, screen_wd);
    XtSetArg (al[3], XtNmaxHeight, screen_ht);
    XtSetValues (toplevel, al, 4);

Recently I tried to do the same thing for a popup dialog box which I created.
I used the same method, but I replaced "toplevel" with the popup dialog box 
widget id.  It didn't work.

Does anyone know how I can define the min and max width and height for the
resizing of a popup dialog box?

Thanks.

-Jonathan

1209.8You need to set them on a shell widgetGR8FUL::HERBERTOrwell was only off by a few yearsTue Oct 24 1989 15:5514
Instead of using the widget ID of the popup widget, you have two choices:

1. Use XtParent(popup) - the toolkit creates a hidden shell widget behind your
   back - this is the widget you need to set the attributes for.

2. Use XtCreatePopupShell to create a shell widget yourself, and then create
   a dialog box (non-popup) as a child of the shell widget. Set the attributes
   on the shell widget.

I recommend method #2, as it doesn't make any assumptions about the internal
nature of the toolkit.

Kevin