]> code.delx.au - gnu-emacs/blobdiff - src/xterm.c
Condense Tramp entries.
[gnu-emacs] / src / xterm.c
index 4fa0e8bb49b4172da02413f9eda14455d18eefbb..a27ddb22612eb8ff4bac2b240652bb2fec4e8e8d 100644 (file)
@@ -8783,12 +8783,12 @@ xg_scroll_callback (widget, data)
   gdouble position;
   gdouble *p;
   int diff;
-  
+
   int part = -1, whole = 0, portion = 0;
   GtkAdjustment *adj = GTK_ADJUSTMENT (widget);
-  
+
   if (xg_ignore_gtk_scrollbar) return;
-  
+
   position = gtk_adjustment_get_value (adj);
 
   p = g_object_get_data (G_OBJECT (widget), XG_LAST_SB_DATA);
@@ -8803,7 +8803,7 @@ xg_scroll_callback (widget, data)
   *p = position;
 
   diff = (int) (position - previous);
-  
+
   if (diff == (int) adj->step_increment)
     {
       part = scroll_bar_down_arrow;
@@ -8831,7 +8831,7 @@ xg_scroll_callback (widget, data)
       portion = min (position, whole);
       bar->dragging = make_number (portion);
     }
-  
+
   if (part >= 0)
     {
       xg_ignore_next_thumb = 1;
@@ -10221,7 +10221,7 @@ enum
    Returns non-zero if the event was filtered, caller shall not process
    this event further.
    Returns zero if event is wasn't filtered.  */
-   
+
 #ifdef HAVE_X_I18N
 static int
 x_filter_event (dpyinfo, event)
@@ -10286,7 +10286,7 @@ event_handler_gdk (gxev, ev, data)
 
 
 /* Handles the XEvent EVENT on display DPYINFO.
-   
+
    *FINISH is X_EVENT_GOTO_OUT if caller should stop reading events.
    *FINISH is zero if caller should continue reading events.
    *FINISH is X_EVENT_DROP if event should not be passed to the toolkit.
@@ -10294,7 +10294,7 @@ event_handler_gdk (gxev, ev, data)
    Events representing keys are stored in buffer *BUFP_R,
    which can hold up to *NUMCHARSP characters.
    We return the number of characters stored into the buffer. */
-   
+
 static int
 handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish)
      struct x_display_info *dpyinfo;
@@ -10312,7 +10312,7 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish)
   XEvent event = *eventp;
 
   *finish = X_EVENT_NORMAL;
-  
+
   switch (event.type)
     {
     case ClientMessage:
@@ -11541,7 +11541,7 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish)
     }
 
   goto ret;
-  
+
  out:
   *finish = X_EVENT_GOTO_OUT;
 
@@ -11549,7 +11549,7 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish)
   *bufp_r = bufp;
   *numcharsp = numchars;
   *eventp = event;
-  
+
   return count;
 }
 
@@ -11569,11 +11569,11 @@ x_dispatch_event (event, display)
   struct input_event *bufpp = bufp;
   int numchars = 10;
   int finish = X_EVENT_NORMAL;
-      
+
   for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next)
     if (dpyinfo->display == display)
       break;
-          
+
   if (dpyinfo)
     {
       int i, events;
@@ -11681,7 +11681,7 @@ XTread_socket (sd, bufp, numchars, expected)
          We use a bunch of globals to communicate with our filter function,
          that is kind of ugly, but it works. */
       current_dpyinfo = dpyinfo;
-      
+
       while (gtk_events_pending ())
         {
           static int nr = 0;
@@ -11703,7 +11703,7 @@ XTread_socket (sd, bufp, numchars, expected)
       while (XPending (dpyinfo->display))
        {
           int finish;
-          
+
          XNextEvent (dpyinfo->display, &event);
 
 #ifdef HAVE_X_I18N
@@ -12432,15 +12432,10 @@ x_text_icon (f, icon_name)
     text.encoding = XA_STRING;
     text.format = 8;
     text.nitems = strlen (icon_name);
-#ifdef USE_X_TOOLKIT
-    XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget),
-                   &text);
-#else /* not USE_X_TOOLKIT */
-    XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text);
-#endif /* not USE_X_TOOLKIT */
+    XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
   }
 #else /* not HAVE_X11R4 */
-  XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), icon_name);
+  XSetIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), icon_name);
 #endif /* not HAVE_X11R4 */
 
   if (f->output_data.x->icon_bitmap > 0)
@@ -13624,11 +13619,7 @@ x_raise_frame (f)
   if (f->async_visible)
     {
       BLOCK_INPUT;
-#ifdef USE_X_TOOLKIT
-      XRaiseWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget));
-#else /* not USE_X_TOOLKIT */
-      XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
-#endif /* not USE_X_TOOLKIT */
+      XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
       XFlush (FRAME_X_DISPLAY (f));
       UNBLOCK_INPUT;
     }
@@ -13643,11 +13634,7 @@ x_lower_frame (f)
   if (f->async_visible)
     {
       BLOCK_INPUT;
-#ifdef USE_X_TOOLKIT
-      XLowerWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget));
-#else /* not USE_X_TOOLKIT */
-      XLowerWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
-#endif /* not USE_X_TOOLKIT */
+      XLowerWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
       XFlush (FRAME_X_DISPLAY (f));
       UNBLOCK_INPUT;
     }
@@ -13709,6 +13696,7 @@ x_make_frame_visible (f)
 #else /* not USE_X_TOOLKIT */
 #ifdef USE_GTK
       gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f));
+      gtk_window_deiconify (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
 #else
       XMapRaised (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
 #endif /* not USE_GTK */
@@ -13837,12 +13825,8 @@ x_make_frame_invisible (f)
 {
   Window window;
 
-#ifdef USE_X_TOOLKIT
   /* Use the frame's outermost window, not the one we normally draw on.  */
-  window = XtWindow (f->output_data.x->widget);
-#else /* not USE_X_TOOLKIT */
-  window = FRAME_X_WINDOW (f);
-#endif /* not USE_X_TOOLKIT */
+  window = FRAME_OUTER_WINDOW (f);
 
   /* Don't keep the highlight on an invisible frame.  */
   if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f)
@@ -14105,7 +14089,7 @@ x_free_frame_resources (f)
           FRAME_GTK_OUTER_WIDGET (f) = 0;
         }
 #endif /* USE_GTK */
-          
+
       if (FRAME_X_WINDOW (f))
        XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
 #endif /* !USE_X_TOOLKIT */
@@ -14208,7 +14192,7 @@ x_wm_set_size_hint (f, flags, user_position)
   int ac = 0;
   Dimension widget_width, widget_height;
 #endif
-  
+
   Window window = FRAME_OUTER_WINDOW (f);
 
   /* Setting PMaxSize caused various problems.  */
@@ -14413,11 +14397,7 @@ x_wm_set_icon_position (f, icon_x, icon_y)
      struct frame *f;
      int icon_x, icon_y;
 {
-#ifdef USE_X_TOOLKIT
-  Window window = XtWindow (f->output_data.x->widget);
-#else
-  Window window = FRAME_X_WINDOW (f);
-#endif
+  Window window = FRAME_OUTER_WINDOW (f);
 
   f->output_data.x->wm_hints.flags |= IconPositionHint;
   f->output_data.x->wm_hints.icon_x = icon_x;
@@ -15198,7 +15178,7 @@ x_term_init (display_name, xrm_option, resource_name)
 
     argv[argc++] = "--name";
     argv[argc++] = resource_name;
-    
+
 #ifdef HAVE_X11R5
     XSetLocaleModifiers ("");
 #endif
@@ -15210,7 +15190,7 @@ x_term_init (display_name, xrm_option, resource_name)
     xg_initialize ();
 
     dpy = GDK_DISPLAY ();
-    
+
     /* NULL window -> events for all windows go to our function */
     gdk_window_add_filter (NULL, event_handler_gdk, NULL);
 
@@ -15226,10 +15206,10 @@ x_term_init (display_name, xrm_option, resource_name)
 
       if (! NILP (abs_file) && Ffile_readable_p (abs_file))
         gtk_rc_parse (SDATA (abs_file));
-      
+
       UNGCPRO;
     }
-    
+
     XSetErrorHandler (x_error_handler);
     XSetIOErrorHandler (x_io_error_quitter);
   }