]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix GNUStep issues with startup.
authorJan Djärv <jan.h.d@swipnet.se>
Sat, 7 Dec 2013 16:48:12 +0000 (17:48 +0100)
committerJan Djärv <jan.h.d@swipnet.se>
Sat, 7 Dec 2013 16:48:12 +0000 (17:48 +0100)
* 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.

src/ChangeLog
src/nsterm.h
src/nsterm.m

index e67fdada36f27ca43a0a62a289c0b6058c6bc919..874d76677c9b5c41910659f22034586816046f36 100644 (file)
@@ -1,5 +1,15 @@
 2013-12-07  Jan Djärv  <jan.h.d@swipnet.se>
 
+       * nsterm.m (x_set_window_size): Remove fprintf.
+       (init): Define always.  Set applicationDidFinishLaunchingCalled
+       for GNUStep.
+       (applicationDidFinishLaunching:): Set
+       applicationDidFinishLaunchingCalled,
+       (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
+       not called.
+
+       * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
+
        Pixel resize changes for NS (Bug#16049).
        * nsterm.m (x_set_window_size): Change parameters rows/cols to
        height/width.  row/cols are locals.
index 976347ad3b4075a1b4049cfcfd33447183d290d1..0215f13dffdb9ede32edd455cd6338dbd49565e5 100644 (file)
@@ -90,6 +90,7 @@ typedef float EmacsCGFloat;
   BOOL isFirst;
 #endif
 #ifdef NS_IMPL_GNUSTEP
+  BOOL applicationDidFinishLaunchingCalled;
 @public
   int nextappdefined;
 #endif
index 37edfb238a9380a090c8f44384e44f12840c995e..07120c7e451c6663d6c9d7c7fda4fb9eda26b16b 100644 (file)
@@ -1320,8 +1320,6 @@ x_set_window_size (struct frame *f,
   [view setRows: rows andColumns: cols];
   [window setFrame: wr display: YES];
 
-  fprintf (stderr, "\tx_set_window_size %d, %d\t%d, %d\n", cols, rows, pixelwidth, pixelheight);
-
   /* This is a trick to compensate for Emacs' managing the scrollbar area
      as a fixed number of standard character columns.  Instead of leaving
      blank space for the extra, we chopped it off above.  Now for
@@ -4410,15 +4408,22 @@ ns_term_shutdown (int sig)
 
 @implementation EmacsApp
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
 - (id)init
 {
   if (self = [super init])
-    self->isFirst = YES;
+    {
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
+      self->isFirst = YES;
+#endif
+#ifdef NS_IMPL_GNUSTEP
+      self->applicationDidFinishLaunchingCalled = NO;
+#endif
+    }
 
   return self;
 }
 
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
 - (void)run
 {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@@ -4605,6 +4610,9 @@ ns_term_shutdown (int sig)
    -------------------------------------------------------------------------- */
 {
   NSTRACE (applicationDidFinishLaunching);
+#ifdef NS_IMPL_GNUSTEP
+  ((EmacsApp *)self)->applicationDidFinishLaunchingCalled = YES;
+#endif
   [NSApp setServicesProvider: NSApp];
   ns_send_appdefined (-2);
 }
@@ -4732,6 +4740,10 @@ not_in_argv (NSString *arg)
 {
   NSTRACE (applicationDidBecomeActive);
 
+#ifdef NS_IMPL_GNUSTEP
+  if (! applicationDidFinishLaunchingCalled)
+    [self applicationDidFinishLaunching:notification];
+#endif
   //ns_app_active=YES;
 
   ns_update_auto_hide_menu_bar ();