bugGNUstep - Bugs: bug #11713, Windows resizable when they...

Group
 
 

bug #11713: Windows resizable when they shouldn't be

Submitter:  Alex Perez <aperez>
Submitted:  Mon 24 Jan 2005 12:57:47 AM UTC
   
 
Category:  Backend Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  alexm
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 12 Feb 2005 10:24:34 PM UTC, comment #5: 

The patch turned out to have some issues with some other combinations of settings and window managers, but I believe I've fixed it all now; works here, at least.

Thus, the general problem should now be fixed in cvs. If there are still problems with specific configuration, please open new bug reports with details about which defaults (i.e. -gui managed decorations or not) and window managers it occurs with.

Module name: gnustep
Branch:
Changes by: Alexander Malmberg <alexm(at)savannah.gnu.org> 05/02/12 12:50:23

Modified files:
core/back      : ChangeLog
core/back/Source/x11: XGServerWindow.m

Log message:
2005-02-12 13:54  Alexander Malmberg  <alexander(at)malmberg.org>

  • Source/x11/XGServerWindow.m (setNormalHints): If the window isn't

resizable, force the min and max sizes to be equal to the current
size.
(-placewindow::): Set the hints after updating xframe.

Fixes bug #11713.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnustep/gnustep/core/back/ChangeLog.diff?tr1=1.353&tr2=1.354&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnustep/gnustep/core/back/Source/x11/XGServerWindow.m.diff?tr1=1.49&tr2=1.50&r1=text&r2=text

Alexander Malmberg <alexm>
Group Member
Tue 01 Feb 2005 12:41:51 AM UTC, comment #4: 

Hi Alex,

as you have an Apple computer, I trust, that you checked the behaviour there and now know for sure that the NSResizableWindowMask trickers the resize/non-resize behaviour and that this does not refelct on the minSize/maxSize of the NSWindow. This anwsers the questions I posed in my mail.
Your hack looks fine to me, it will change the settings a bit too often, even when an unrelated attribute of the window changes, but this should not do any harm.

Fred Kiefer <FredKiefer>
Group Member
Sun 30 Jan 2005 07:57:18 PM UTC, comment #3: 

OK, to clarify on a few points here:

An NSWindow that doesn't have the NSResizableWindowMask bit set cannot be resized by the user. (It can still be resized programatically, but that's not relevant here, so I'm going to ignore it.)

setWindowHintsForStyle (back/Source/x11/XGServerWindow.m) tries to set hints that communicate this information to window managers. Currently, it sets motif style hints. Apparently, there are window managers that don't understand these hints, and thus the windows are resizable even when they shouldn't be.

As for min and max size, my point was that we can, perhaps, "emulate" a non-resizable window be setting equal min and max sizes, even on window managers that don't understand motif hints. Long term, it'd be better to support setting other hints to let these window managers know about this, though. (And to prevent any possible future confusion, note that this has nothing to do with the window min/max size in NSWindow in gui. :)

Anyway, I've attached a quick hack of a patch that does this. Testing would be appreciated! :)

Alexander Malmberg <alexm>
Group Member
Sat 29 Jan 2005 07:05:57 PM UTC, comment #2: 

Perhaps I did not ask my questions in the last comment clear enough, so I started to test them myself. I tested with the standart KDE window manager.

Leaving out the NSResizableWindowMask doesn't have any effect on the window. Setting the min and max size of a window makes it, as expected, un-resizable. From this I would say we only need to understand the expected behaviour and implement it, no additional function calls will be needed.

So here the rephrased questions:
- Are NSPanels always expected to be non resizable?
- Is a window (or panel) without the NSResizableWindowMask flag expected to be non-resizable?


Fred Kiefer <FredKiefer>
Group Member
Fri 28 Jan 2005 04:55:32 PM UTC, comment #1: 

You should provide more information on the expected behaviour first. Currently GNUstep will pass on the values you provide in your application for the NSWindow minSize and maxSize to the window manager. Is this working for you?

There is also a style flag for an NSWindow (NSResizableWindowMask) to define if resize controls should be shown. Are you expecting this flag, if not present, to trigger the window to be not resizable? If so, will the minSize and maxSize of the window change as well, or should the backend handle this behaviour internally?

As for XSetWMSizeHints, I am not quite sure, why we should use this instead of XSetWMNormalHints. I found one usage of this on the web where it gets used for XA_WM_ZOOM_HINTS. Is this what we need?

Fred Kiefer <FredKiefer>
Group Member
Mon 24 Jan 2005 12:57:47 AM UTC, original submission:  

When using window managers besides WindowMaker (all others which do not support Motif window hints, which seems to be an increasing number of them), windows which are defined within GNUstep as non-resizable can be resized to your hearts content. This causes errors to be written to the console, and you simply shouldn't be able to resize non-resizable windows. XSetWMSizeHints needs to be set in XGServerWindow.m According to Alexander Malmberg, there's no "don't resize" bit in XSizeHints, although we should set equal min and max sizes to emulate it.

This is a known problem with at least the default GNOME window manager, and I think the default KDE window manager as well.

Alex Perez <aperez>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2469:  window_resize.patch added by alexm (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-02-12 alexm StatusNone Fixed
    Open/ClosedOpen Closed
2005-01-30 alexm Attached File- Added window_resize.patch, #2131
2005-01-28 FredKiefer Summary Windows resizable when they shouldn't be Windows resizable when they shouldn't be

Back to the top

Powered by Savane 3.13-02a9.
Corresponding source code