Skip to content

368 resize no decorations macos subclass - #1

Closed
sodiumjoe wants to merge 2 commits into
robertgzr:windowbuilderext-macosfrom
sodiumjoe:368-resize-no-decorations-macos-subclass
Closed

sodiumjoe wants to merge 2 commits into
robertgzr:windowbuilderext-macosfrom
sodiumjoe:368-resize-no-decorations-macos-subclass

Conversation

@sodiumjoe

Copy link
Copy Markdown

depends on rust-windowing#408 to work properly

@sodiumjoe

sodiumjoe commented Mar 11, 2018 •

Copy link
Copy Markdown
Author

So, I'm actually working on a different way to hide the titlebar:

                if pl_attrs.titlebar_hidden {
                    window.setTitleVisibility_(appkit::NSWindowTitleVisibility::NSWindowTitleHidden);
                    window.setTitlebarAppearsTransparent_(YES);
                    let button = window.standardWindowButton_(NSWindowButton::NSWindowFullScreenButton);
                    msg_send![button, setHidden:YES];
                    let button = window.standardWindowButton_(NSWindowButton::NSWindowMiniaturizeButton);
                    msg_send![button, setHidden:YES];
                    let button = window.standardWindowButton_(NSWindowButton::NSWindowCloseButton);
                    msg_send![button, setHidden:YES];
                    let button = window.standardWindowButton_(NSWindowButton::NSWindowZoomButton);
                    msg_send![button, setHidden:YES];

This is basically just .fullsize_content_view(true) and also hiding the buttons themselves. I think this is better than using borderlessWindowMask because it leaves the rounded corners, and keeps the shadow behavior for active windows.

The only thing I still would like to figure out is the weird behavior in external monitors I noted in alacritty/alacritty#947 (comment).

Once (if) I figure that out, I think I may change this PR to just add another attribute .titlebar_buttons_hidden.

@sodiumjoe

Copy link
Copy Markdown
Author

@robertgzr Hey, was wondering if you had a chance to look at this. I think I'll just open my own PR to winit if you don't have time to look at this. Thanks!

@robertgzr

robertgzr commented Mar 19, 2018 •

Copy link
Copy Markdown
Owner

@sodiumjoe sorry about the radio silence

Did you figure out something for the external monitor issue?

The only thing I still would like to figure out is the weird behavior in external monitors I noted in alacritty/alacritty#947 (comment).

I actually think it's a good idea to let people from upstream look at this because I don't really know much about the cocoa parts we touch here...

@sodiumjoe

sodiumjoe commented Mar 19, 2018 •

Copy link
Copy Markdown
Author

@robertgzr sorry, I got impatient.

I haven't had a chance to figure out the dpi thing, because I mostly work on this at home, and my external monitor setup is at work. I'll try to dig into it this week.

the hidden titlebar buttons is more or less orthogonal to that though, so imo, we should try to get all these extensions merged regardless. if you're still trying to get this pr merged, I'd like to add one more commit and I'll close my other PR.

@sodiumjoe
sodiumjoe force-pushed the 368-resize-no-decorations-macos-subclass branch 2 times, most recently from a4055d8 to 0cffa82 Compare March 19, 2018 04:47
@sodiumjoe
sodiumjoe force-pushed the 368-resize-no-decorations-macos-subclass branch from 0cffa82 to 02d3609 Compare March 19, 2018 04:58
@robertgzr

Copy link
Copy Markdown
Owner

Once rust-windowing#408 get's merged I would be happy to merge this and update rust-windowing#389 :)

@sodiumjoe

Copy link
Copy Markdown
Author

ok sounds good, thanks!

@sodiumjoe sodiumjoe closed this Mar 24, 2018
@sodiumjoe
sodiumjoe deleted the 368-resize-no-decorations-macos-subclass branch March 24, 2018 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants