Tk Source Code

Check-in [7ea0be3c]
Login

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

Overview
Comment:Give overrideredirect windows CollectionBehaviors so they do not try to become FullScreen, but can appear on top of a FullScreen window.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-185c8557d9
Files: files | file ages | folders
SHA3-256:7ea0be3ccf452cbc7e8ed7d2b4b0f93f2a552f13897104e7ce3fcd3327a287e8
User & Date: culler 2018-12-07 17:04:42
References
2018-12-07
17:18 Ticket [185c8557] mac os x: wm overrideredict causes window to disappear... status still Open with 4 other changes artifact: 16cbc3b7 user: marc_culler
Context
2018-12-07
18:22
Fix constraint name. !aqua is not a known constraint (the test was skipped in all platforms), however notAqua is known and lets the test run in anything else than aqua. check-in: e2f95aa5 user: fvogel tags: bug-185c8557d9
17:04
Give overrideredirect windows CollectionBehaviors so they do not try to become FullScreen, but can appear on top of a FullScreen window. check-in: 7ea0be3c user: culler tags: bug-185c8557d9
15:51
Mark tests wm-stackorder-5.2 and wm-stackorder-6.1 as inappropriate for aqua. check-in: cc743684 user: culler tags: bug-185c8557d9
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to macosx/tkMacOSXWindowEvent.c.

172
173
174
175
176
177
178
179
180
181
182
183
184
185
186

    /*
     * We don't need to change the proposed size, but we do need to
     * implement this method.  Otherwise the full screen window will
     * be sized to the screen's visibleFrame, leaving black bands at
     * the top and bottom.
     */

    return proposedSize;
}

- (void) windowEnteredFullScreen: (NSNotification *) notification
{
#ifdef TK_MAC_DEBUG_NOTIFICATIONS
    TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, notification);







<







172
173
174
175
176
177
178

179
180
181
182
183
184
185

    /*
     * We don't need to change the proposed size, but we do need to
     * implement this method.  Otherwise the full screen window will
     * be sized to the screen's visibleFrame, leaving black bands at
     * the top and bottom.
     */

    return proposedSize;
}

- (void) windowEnteredFullScreen: (NSNotification *) notification
{
#ifdef TK_MAC_DEBUG_NOTIFICATIONS
    TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, notification);

Changes to macosx/tkMacOSXWm.c.

6507
6508
6509
6510
6511
6512
6513




6514
6515
6516
6517
6518
6519
6520
6521
6522
6523

6524
6525
6526
6527
6528
6529
6530
	     * full screen, was included in the default as of OSX 10.13.  For
	     * uniformity we use the new default in all versions of the OS
	     * where the behavior exists.
	     */

#if !(MAC_OS_X_VERSION_MAX_ALLOWED < 1070)
	    if (!(macWindow.styleMask & NSUtilityWindowMask)) {




		NSSize screenSize = [[macWindow screen]frame].size;
		b |= NSWindowCollectionBehaviorFullScreenPrimary;

		/* The default max size has height less than the screen height.
		 * This causes the window manager to refuse to allow the window
		 * to be resized when it is a split window.  To work around
		 * this we make the max size equal to the screen size.
		 */

		[macWindow setMaxFullScreenContentSize:screenSize];

	    }
#endif

	    if (newAttributes & tkCanJoinAllSpacesAttribute) {
		b |= NSWindowCollectionBehaviorCanJoinAllSpaces;
	    } else if (newAttributes & tkMoveToActiveSpaceAttribute) {
		b |= NSWindowCollectionBehaviorMoveToActiveSpace;







>
>
>
>
|
|

|
|
|
|
|

|
>







6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
	     * full screen, was included in the default as of OSX 10.13.  For
	     * uniformity we use the new default in all versions of the OS
	     * where the behavior exists.
	     */

#if !(MAC_OS_X_VERSION_MAX_ALLOWED < 1070)
	    if (!(macWindow.styleMask & NSUtilityWindowMask)) {
		if (winPtr->atts.override_redirect) {
		    b |= (NSWindowCollectionBehaviorCanJoinAllSpaces |
			  NSWindowCollectionBehaviorFullScreenAuxiliary);
		} else {
		    NSSize screenSize = [[macWindow screen]frame].size;
		    b |= NSWindowCollectionBehaviorFullScreenPrimary;

		    /* The default max size has height less than the screen height.
		     * This causes the window manager to refuse to allow the window
		     * to be resized when it is a split window.  To work around
		     * this we make the max size equal to the screen size.
		     */

		    [macWindow setMaxFullScreenContentSize:screenSize];
		}
	    }
#endif

	    if (newAttributes & tkCanJoinAllSpacesAttribute) {
		b |= NSWindowCollectionBehaviorCanJoinAllSpaces;
	    } else if (newAttributes & tkMoveToActiveSpaceAttribute) {
		b |= NSWindowCollectionBehaviorMoveToActiveSpace;