aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoi Martin <jroi.martin@gmail.com>2014-11-16 01:02:57 +0100
committerRuss Cox <rsc@swtch.com>2014-12-02 00:51:49 +0000
commitd3a47e14e5ebf7a4d8ca8c9a3dfe748b93d3663a (patch)
tree1ab92304b016404673379711fe92d3e0c9b19166 /src
parent679d176fea274cd5f9c3a69dd98009a13a153a7d (diff)
downloadplan9port-d3a47e14e5ebf7a4d8ca8c9a3dfe748b93d3663a.tar.gz
plan9port-d3a47e14e5ebf7a4d8ca8c9a3dfe748b93d3663a.tar.bz2
plan9port-d3a47e14e5ebf7a4d8ca8c9a3dfe748b93d3663a.zip
devdraw: fix title and "open in top" on OS X
On OSX 10.10, when you open an application that depends on devdraw, the title bar only shows the first letter of the application's name. The patch sets a default title as soon as the window is created, which fixes this issue. On OSX 10.10, when you open an application that depends on devdraw, this application is opened in top of other windows, however the menu bar is not updated. The patch calls topwin() at the end of makewin() in src/cmd/devdraw/cocoa-screen.m . Change-Id: Ie036928b5574c8df20ad8b2b54047e2f7a22bb41 Reviewed-on: https://plan9port-review.googlesource.com/1091 Reviewed-by: Russ Cox <rsc@swtch.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/devdraw/cocoa-screen.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m
index b2690d15..1e9ba3f8 100644
--- a/src/cmd/devdraw/cocoa-screen.m
+++ b/src/cmd/devdraw/cocoa-screen.m
@@ -98,7 +98,6 @@ threadmain(int argc, char **argv)
[NSApplication sharedApplication];
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
[NSApp setDelegate:[appdelegate new]];
- [NSApp activateIgnoringOtherApps:YES];
[NSApp run];
}
@@ -345,6 +344,8 @@ makewin(char *s)
initWithContentRect:r
styleMask:Winstyle
backing:NSBackingStoreBuffered defer:NO];
+ [w setTitle:@"devdraw"];
+
if(!set)
[w center];
#if OSX_VERSION >= 100700
@@ -366,6 +367,8 @@ makewin(char *s)
win.isofs = 0;
win.content = [contentview new];
[WIN setContentView:win.content];
+
+ topwin();
}
static Memimage*