Tk Source Code

Changes On Branch bug-6ca257310a
Login

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

Changes In Branch bug-6ca257310a Excluding Merge-Ins

This is equivalent to a diff from 984c527aa8 to 32b9c8fee0

2018-07-04
07:12
Fix [6ca257310a]: wm resizable does not disable single dimension resizing on macOS. Patch from Marc Culler. check-in: 155ec67d85 user: fvogel tags: core-8-6-branch
07:04
Fix [68b78ef96a]: wm-attributes-1.2.5 fails on macOS check-in: e90dd8908f user: fvogel tags: core-8-6-branch
2018-06-30
21:08
Fix bug [1356961b8c]: add code to ensure wm transient is using a true toplevel as the master. Closed-Leaf check-in: ba4117fa44 user: culler tags: bug-1356961b8c
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
2018-06-28
19:42
Fix [119bb094af]: wm-iconbitmap-1.4 fails on macOS check-in: 4a310eb1cb user: fvogel tags: bug-119bb094af
2018-06-18
20:08
Fix [68b78ef96a]: wm-attributes-1.2.5 fails on macOS Closed-Leaf check-in: d584f22e16 user: fvogel tags: bug-68b78ef96a
07:49
Sync unix/tcl.m4 with Tcl version, and re-generate unix configure script check-in: f4ff72ef9d user: jan.nijtmans tags: trunk
07:44
Sync tcl.m4 with Tcl, and regenerate configure script check-in: 984c527aa8 user: jan.nijtmans tags: core-8-6-branch
07:37
Sync DIR64 changes from Tcl to Tk too (even though DIR64 isn't actually used for Tk. Just for completeness. check-in: 657e332cd3 user: jan.nijtmans tags: core-8-5-branch
2018-06-17
15:34
merge 8.5 check-in: 21fcf52e55 user: jan.nijtmans tags: core-8-6-branch

Changes to macosx/tkMacOSXWm.c.

227
228
229
230
231
232
233













234
235
236
237
238
239
240
    pointrect.origin = point;
    pointrect.size.width = 0;
    pointrect.size.height = 0;
    return [self convertRectFromScreen:pointrect].origin;
}
#endif














@end

#pragma mark -


/*
 * Forward declarations for procedures defined in this file:







>
>
>
>
>
>
>
>
>
>
>
>
>







227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
    pointrect.origin = point;
    pointrect.size.width = 0;
    pointrect.size.height = 0;
    return [self convertRectFromScreen:pointrect].origin;
}
#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 -


/*
 * Forward declarations for procedures defined in this file:
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275




6276
6277
6278
6279
6280
6281
6282
6283
	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) &&







|
|
<

|
>
>
>
>
|







6277
6278
6279
6280
6281
6282
6283
6284
6285

6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
	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) &&

Changes to tests/wm.test.

1238
1239
1240
1241
1242
1243
1244
1245
1246


1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
    wm resizable .t bad 0
} -result {expected boolean value but got "bad"}
test wm-resizable-1.5 {usage} -returnCodes error -body {
    wm resizable .t 1 bad
} -result {expected boolean value but got "bad"}

test wm-resizable-2.1 {setting and reading values} {
    wm resizable .t 0 1
    set result [wm resizable .t]


    wm resizable .t 1 0
    lappend result [wm resizable .t]
    wm resizable .t 1 1
    lappend result [wm resizable .t]
} {0 1 {1 0} {1 1}}


### wm sizefrom ###
test wm-sizefrom-1.1 {usage} -returnCodes error -body {
    wm sizefrom
} -result {wrong # args: should be "wm option window ?arg ...?"}
test wm-sizefrom-1.2 {usage} -returnCodes error -body {







|

>
>




|







1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
    wm resizable .t bad 0
} -result {expected boolean value but got "bad"}
test wm-resizable-1.5 {usage} -returnCodes error -body {
    wm resizable .t 1 bad
} -result {expected boolean value but got "bad"}

test wm-resizable-2.1 {setting and reading values} {
    wm resizable .t 0 0
    set result [wm resizable .t]
    wm resizable .t 0 1
    lappend result [wm resizable .t]
    wm resizable .t 1 0
    lappend result [wm resizable .t]
    wm resizable .t 1 1
    lappend result [wm resizable .t]
} {0 0 {0 1} {1 0} {1 1}}


### wm sizefrom ###
test wm-sizefrom-1.1 {usage} -returnCodes error -body {
    wm sizefrom
} -result {wrong # args: should be "wm option window ?arg ...?"}
test wm-sizefrom-1.2 {usage} -returnCodes error -body {