From: Richard M. Stallman Date: Fri, 14 Oct 1994 05:18:22 +0000 (+0000) Subject: (Fx_create_frame): Init the FRAME_X_SCREEN as soon as can be done. X-Git-Tag: emacs-19.34~6326 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8e3d10a98706b7d70c1d55a5052c0a69536988db;p=emacs.git (Fx_create_frame): Init the FRAME_X_SCREEN as soon as can be done. --- diff --git a/src/xfns.c b/src/xfns.c index 562c366458b..6cd3450ec67 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1879,7 +1879,8 @@ XSetWMProtocols (dpy, w, protocols, count) #ifdef USE_X_TOOLKIT -/* WM_DELETE_WINDOW, and WM_SAVE_YOURSELF, then add them. (They may +/* If the WM_PROTOCOLS property does not already contain WM_TAKE_FOCUS, + WM_DELETE_WINDOW, and WM_SAVE_YOURSELF, then add them. (They may already be present because of the toolkit (Motif adds some of them, for example, but Xt doesn't). */ @@ -2362,6 +2363,10 @@ be shared by the new frame.") f->display.x = (struct x_display *) xmalloc (sizeof (struct x_display)); bzero (f->display.x, sizeof (struct x_display)); + FRAME_X_SCREEN (f) = &the_x_screen; + FRAME_X_SCREEN (f)->reference_count++; + the_x_screen.x_display_value = x_current_display; + /* Note that the frame has no physical cursor right now. */ f->phys_cursor_x = -1; @@ -2491,10 +2496,6 @@ be shared by the new frame.") tem = x_get_arg (parms, Qunsplittable, 0, 0, boolean); f->no_split = minibuffer_only || EQ (tem, Qt); - FRAME_X_SCREEN (f) = &the_x_screen; - FRAME_X_SCREEN (f)->reference_count++; - the_x_screen.x_display_value = x_current_display; - UNGCPRO; /* It is now ok to make the frame official