aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2013-12-07 17:48:12 +0100
committerJan Djärv2013-12-07 17:48:12 +0100
commit1bb2debd5f1f02397458de593531f9712cfeb068 (patch)
tree42b0950aa773227f70c027e0c081a3b2f6a946f4
parentfa6fa1a1773f255b5efbe52a743b017f4908a6cb (diff)
downloademacs-1bb2debd5f1f02397458de593531f9712cfeb068.tar.gz
emacs-1bb2debd5f1f02397458de593531f9712cfeb068.zip
Fix GNUStep issues with startup.
* nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled. Pixel resize changes for NS. * nsterm.m (x_set_window_size): Change parameters rows/cols to height/width. row/cols are locals. Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT. (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize. (windowWillResize): Remove gsextra. Calculate extra as in updateFrameSize. (x_new_font): Don't change frame size if fullscreen. Change size pixelwise. * nsterm.m (x_set_window_size): Remove fprintf. (init): Define always. Set applicationDidFinishLaunchingCalled for GNUStep. (applicationDidFinishLaunching:): Set applicationDidFinishLaunchingCalled, (applicationDidBecomeActive:): Call applicationDidFinishLaunching if not called.
-rw-r--r--src/ChangeLog10
-rw-r--r--src/nsterm.h1
-rw-r--r--src/nsterm.m20
3 files changed, 27 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e67fdada36f..874d76677c9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
12013-12-07 Jan Djärv <jan.h.d@swipnet.se> 12013-12-07 Jan Djärv <jan.h.d@swipnet.se>
2 2
3 * nsterm.m (x_set_window_size): Remove fprintf.
4 (init): Define always. Set applicationDidFinishLaunchingCalled
5 for GNUStep.
6 (applicationDidFinishLaunching:): Set
7 applicationDidFinishLaunchingCalled,
8 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
9 not called.
10
11 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
12
3 Pixel resize changes for NS (Bug#16049). 13 Pixel resize changes for NS (Bug#16049).
4 * nsterm.m (x_set_window_size): Change parameters rows/cols to 14 * nsterm.m (x_set_window_size): Change parameters rows/cols to
5 height/width. row/cols are locals. 15 height/width. row/cols are locals.
diff --git a/src/nsterm.h b/src/nsterm.h
index 976347ad3b4..0215f13dffd 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -90,6 +90,7 @@ typedef float EmacsCGFloat;
90 BOOL isFirst; 90 BOOL isFirst;
91#endif 91#endif
92#ifdef NS_IMPL_GNUSTEP 92#ifdef NS_IMPL_GNUSTEP
93 BOOL applicationDidFinishLaunchingCalled;
93@public 94@public
94 int nextappdefined; 95 int nextappdefined;
95#endif 96#endif
diff --git a/src/nsterm.m b/src/nsterm.m
index 37edfb238a9..07120c7e451 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1320,8 +1320,6 @@ x_set_window_size (struct frame *f,
1320 [view setRows: rows andColumns: cols]; 1320 [view setRows: rows andColumns: cols];
1321 [window setFrame: wr display: YES]; 1321 [window setFrame: wr display: YES];
1322 1322
1323 fprintf (stderr, "\tx_set_window_size %d, %d\t%d, %d\n", cols, rows, pixelwidth, pixelheight);
1324
1325 /* This is a trick to compensate for Emacs' managing the scrollbar area 1323 /* This is a trick to compensate for Emacs' managing the scrollbar area
1326 as a fixed number of standard character columns. Instead of leaving 1324 as a fixed number of standard character columns. Instead of leaving
1327 blank space for the extra, we chopped it off above. Now for 1325 blank space for the extra, we chopped it off above. Now for
@@ -4410,15 +4408,22 @@ ns_term_shutdown (int sig)
4410 4408
4411@implementation EmacsApp 4409@implementation EmacsApp
4412 4410
4413#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
4414- (id)init 4411- (id)init
4415{ 4412{
4416 if (self = [super init]) 4413 if (self = [super init])
4417 self->isFirst = YES; 4414 {
4415#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
4416 self->isFirst = YES;
4417#endif
4418#ifdef NS_IMPL_GNUSTEP
4419 self->applicationDidFinishLaunchingCalled = NO;
4420#endif
4421 }
4418 4422
4419 return self; 4423 return self;
4420} 4424}
4421 4425
4426#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
4422- (void)run 4427- (void)run
4423{ 4428{
4424 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 4429 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@@ -4605,6 +4610,9 @@ ns_term_shutdown (int sig)
4605 -------------------------------------------------------------------------- */ 4610 -------------------------------------------------------------------------- */
4606{ 4611{
4607 NSTRACE (applicationDidFinishLaunching); 4612 NSTRACE (applicationDidFinishLaunching);
4613#ifdef NS_IMPL_GNUSTEP
4614 ((EmacsApp *)self)->applicationDidFinishLaunchingCalled = YES;
4615#endif
4608 [NSApp setServicesProvider: NSApp]; 4616 [NSApp setServicesProvider: NSApp];
4609 ns_send_appdefined (-2); 4617 ns_send_appdefined (-2);
4610} 4618}
@@ -4732,6 +4740,10 @@ not_in_argv (NSString *arg)
4732{ 4740{
4733 NSTRACE (applicationDidBecomeActive); 4741 NSTRACE (applicationDidBecomeActive);
4734 4742
4743#ifdef NS_IMPL_GNUSTEP
4744 if (! applicationDidFinishLaunchingCalled)
4745 [self applicationDidFinishLaunching:notification];
4746#endif
4735 //ns_app_active=YES; 4747 //ns_app_active=YES;
4736 4748
4737 ns_update_auto_hide_menu_bar (); 4749 ns_update_auto_hide_menu_bar ();