Tk Source Code

Check-in [3752da0337]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Synchronize the resizing flags and attributes so wm resizable reports values correctly.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-6ca257310a
Files: files | file ages | folders
SHA3-256:3752da033789be260bb489fc2931cb66ff25128e33673a2b343288a535513bc2
User & Date: culler 2018-06-30 13:48:38
References
2018-06-30
13:52 Ticket [6ca257310a] resizable() does not disable single dimension resizing status still Open with 4 other changes artifact: f27fb95490 user: marc_culler
Context
2018-06-30
14:30
Complete test wm-resizable-2.1 with the fourth combination case Closed-Leaf check-in: 32b9c8fee0 user: fvogel tags: bug-6ca257310a
13:48
Synchronize the resizing flags and attributes so wm resizable reports values correctly. check-in: 3752da0337 user: culler tags: bug-6ca257310a
2018-06-29
21:39
Fix bug [6ca257310a]: add implementation of [TkWindow windowWillResize]. check-in: c3fd47a7fd user: culler tags: bug-6ca257310a
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to macosx/tkMacOSXWm.c.

232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
....
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288




6289
6290
6291
6292
6293
6294
6295
6296
#endif

- (NSSize)windowWillResize:(NSWindow *)sender 
                    toSize:(NSSize)frameSize
{
    NSRect currentFrame = [sender frame];
    TkWindow *winPtr = TkMacOSXGetTkWindow(sender);
    if (!(winPtr->wmInfoPtr->attributes & kWindowHorizontalZoomAttribute)) {
	frameSize.width = currentFrame.size.width;
    }
    if (!(winPtr->wmInfoPtr->attributes & kWindowVerticalZoomAttribute)) {
	frameSize.height = currentFrame.size.height;
    }
    return frameSize;
}
@end

#pragma mark -
................................................................................
	if ((changedAttributes & (kWindowResizableAttribute |
		kWindowFullZoomAttribute)) || initial) {
	    [macWindow setShowsResizeIndicator:
		    !!(newAttributes & kWindowResizableAttribute)];
	    [[macWindow standardWindowButton:NSWindowZoomButton]
		    setEnabled:(newAttributes & kWindowResizableAttribute) &&
		    (newAttributes & kWindowFullZoomAttribute)];
	    if (newAttributes & kWindowResizableAttribute) {
		wmPtr->flags &= ~(WM_WIDTH_NOT_RESIZABLE |
			WM_HEIGHT_NOT_RESIZABLE);
	    } else {
		wmPtr->flags |= (WM_WIDTH_NOT_RESIZABLE |




			WM_HEIGHT_NOT_RESIZABLE);
	    }
	    WmUpdateGeom(wmPtr, winPtr);
	}
	if ((changedAttributes & kWindowToolbarButtonAttribute) || initial) {
	    [macWindow setShowsToolbarButton:
		    !!(newAttributes & kWindowToolbarButtonAttribute)];
	    if ((newAttributes & kWindowToolbarButtonAttribute) &&







|


|







 







|
|
<

|
>
>
>
>
|







232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
....
6277
6278
6279
6280
6281
6282
6283
6284
6285

6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
#endif

- (NSSize)windowWillResize:(NSWindow *)sender 
                    toSize:(NSSize)frameSize
{
    NSRect currentFrame = [sender frame];
    TkWindow *winPtr = TkMacOSXGetTkWindow(sender);
    if (winPtr->wmInfoPtr->flags & WM_WIDTH_NOT_RESIZABLE) {
	frameSize.width = currentFrame.size.width;
    }
    if (winPtr->wmInfoPtr->flags & WM_HEIGHT_NOT_RESIZABLE) {
	frameSize.height = currentFrame.size.height;
    }
    return frameSize;
}
@end

#pragma mark -
................................................................................
	if ((changedAttributes & (kWindowResizableAttribute |
		kWindowFullZoomAttribute)) || initial) {
	    [macWindow setShowsResizeIndicator:
		    !!(newAttributes & kWindowResizableAttribute)];
	    [[macWindow standardWindowButton:NSWindowZoomButton]
		    setEnabled:(newAttributes & kWindowResizableAttribute) &&
		    (newAttributes & kWindowFullZoomAttribute)];
	    if (newAttributes & kWindowHorizontalZoomAttribute) {
		wmPtr->flags &= ~(WM_WIDTH_NOT_RESIZABLE);

	    } else {
		wmPtr->flags |= (WM_WIDTH_NOT_RESIZABLE);
	    }
	    if (newAttributes & kWindowVerticalZoomAttribute) {
		wmPtr->flags &= ~(WM_HEIGHT_NOT_RESIZABLE);
	    } else {
		wmPtr->flags |= (WM_HEIGHT_NOT_RESIZABLE);
	    }
	    WmUpdateGeom(wmPtr, winPtr);
	}
	if ((changedAttributes & kWindowToolbarButtonAttribute) || initial) {
	    [macWindow setShowsToolbarButton:
		    !!(newAttributes & kWindowToolbarButtonAttribute)];
	    if ((newAttributes & kWindowToolbarButtonAttribute) &&