Skip to content
This repository

Windows larger than the browser window open underneath the main menubar #1690

Closed
BlairDuncan opened this Issue November 20, 2012 · 18 comments

5 participants

Blair Duncan Aparajita Fishman CappBot Andrew Hankinson Stefan Wallström
Blair Duncan

Can be replicated in Tests/Manual/CPDocumentControllerTest/withNib.
Add the following method to Document.j to override the default startup window postion.

- (void)windowControllerDidLoadCib:(CPWindowController)aWindowController
{
    [[aWindowController window] center];
}

Run the app with the browser window smaller than the document window.
You will see that the document opens below the menu bar rendering it inaccessible.

You'll also notice that the title of the document appears in the menubar. I've never seen a cocoa app with document title in the main menubar.

CappBot
Collaborator

Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.

Andrew Hankinson

I've confirmed two related issues:

1) The document title bar appears under the main menu, making it impossible to select and drag the window
2) The document title appears in the menu bar (very strange and definitely non-Cocoa), with the additional bug that if the width of the window is too small the title will appear underneath the menu items, making both unreadable.

-#new
+bug
+AppKit
+#needs-review
milestone=0.9.7

CappBot
Collaborator

Milestone: 0.9.7. Labels: #needs-review, AppKit, bug. What's next? This issue is pending an architectural or implementation design decision and should be discussed or voted on.

Aparajita Fishman
Owner
CappBot
Collaborator

Milestone: 0.9.7. Labels: #accepted, AppKit, bug. What's next? A reviewer should examine this issue.

Aparajita Fishman aparajita closed this issue from a commit March 12, 2013
Aparajita Fishman Fixed: windows were allowed to extend beyond the usable screen content.
Previously, no bounds were placed on the placement or sizing of windows, which allowed them to extend beyond the usable screen content (the area bounded by the menu bar at the top and the platform window on the other sides).

Cocoa enforces the following restrictions:

- When a window is ordered in, it is forced within the usable screen content (below the menu bar) and its size and width are clipped to the usable screen content as well.

- If a window is already visible, any methods that move or resize the window will ensure the top and bottom of the window are within the usable screen content. The width is unchanged.

This commit implements Cocoa's restrictions in CPWindow.

Fixes #1690
bbfaac5
Aparajita Fishman aparajita closed this in bbfaac5 March 12, 2013
Aparajita Fishman
Owner

#fixed

CappBot
Collaborator

Milestone: 0.9.7. Labels: #fixed, AppKit, bug. What's next? This issue is considered successfully resolved.

Blair Duncan

can't really tell if its fixed or not, but our menus are definately messed up....
Screen shot 2013-03-12 at 2 09 38 PM
Screen shot 2013-03-12 at 2 10 54 PM

Aparajita Fishman
Owner
Aparajita Fishman
Owner
Blair Duncan

One more thing, there is now no longer a black line in the document between the document window header and the content view. It just shows up as two small ticks on the left and right. You can see them in the screen cap above just below the w in NewApplication.

Aparajita Fishman
Owner
Stefan Wallström
stewa commented March 12, 2013

The first of these to commits seems to have screwed up attached sheets. Look at Test/Manual/AttachedSheet2
They appear a bit below the window title.

Stefan Wallström
stewa commented March 12, 2013

And they don't seem to animate, but maybe that's related to other commits.

Aparajita Fishman
Owner
Aparajita Fishman
Owner
Blair Duncan

That just leaves the title that appears in the middle of the document. You can see it in the first screencap between the Format and View menus.
@aparajita My fix for that is this, I think we can remove it from CPWindow, comments?

@implementation CPWindow (noTitleInMenuBar)

- (void)_synchronizeMenuBarTitleWithWindowTitle
{
}

@end
Aparajita Fishman
Owner

Yeah, I don't know what that is doing there. I have never seen a document's title in my menu bar in Cocoa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.