changeset 67264:d50a6a8cfd1e

* xfns.c (x_real_positions): int ign => unsigned int. (xg_set_icon_from_xpm_data): Remove unused variable err. (x_set_name_internal, Fx_create_frame, xg_set_icon): Add cast to remove compiler warning. (compute_tip_xy): Put tip above pointer if it doesn't fit below.
author Jan Djärv <jan.h.d@swipnet.se>
date Fri, 02 Dec 2005 14:55:14 +0000
parents b2d1b6e2f96a
children 8c33a73a9eb2
files src/xfns.c
diffstat 1 files changed, 11 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Fri Dec 02 14:12:31 2005 +0000
+++ b/src/xfns.c	Fri Dec 02 14:55:14 2005 +0000
@@ -608,7 +608,7 @@
 
   if (! had_errors)
     {
-      int ign;
+      unsigned int ign;
       Window child, rootw;
 
       /* Get the real coordinates for the WM window upper left corner */
@@ -794,9 +794,7 @@
     {
       GdkPixbuf *pixbuf;
       GError *err = NULL;
-      char *filename;
-
-      filename = SDATA (found);
+      char *filename = (char *) SDATA (found);
       BLOCK_INPUT;
 
       pixbuf = gdk_pixbuf_new_from_file (filename, &err);
@@ -825,17 +823,12 @@
     char **data;
 {
   int result = 0;
-  GError *err = NULL;
-  GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data);
+  GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) data);
 
   if (!pixbuf)
-    {
-      g_error_free (err);
-      return 0;
-    }
-
-  gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
-		       pixbuf);
+    return 0;
+
+  gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), pixbuf);
   g_object_unref (pixbuf);
   return 1;
 }
@@ -1649,7 +1642,7 @@
 
 #ifdef USE_GTK
         gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
-                              SDATA (ENCODE_UTF_8 (name)));
+                              (char *) SDATA (ENCODE_UTF_8 (name)));
 #else /* not USE_GTK */
 	XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
 #endif /* not USE_GTK */
@@ -3376,7 +3369,7 @@
                        FRAME_OUTER_WINDOW (f),
                        dpyinfo->Xatom_wm_client_leader,
                        XA_WINDOW, 32, PropModeReplace,
-                       (char *) &dpyinfo->client_leader_window, 1);
+                       (unsigned char *) &dpyinfo->client_leader_window, 1);
       UNBLOCK_INPUT;
     }
 
@@ -4942,6 +4935,9 @@
     *root_y = XINT (top);
   else if (*root_y + XINT (dy) - height < 0)
     *root_y -= XINT (dy);
+  else if (*root_y + XINT (dy) >= FRAME_X_DISPLAY_INFO (f)->height)
+    /* Put tip above the pointer.  */
+    *root_y -= XINT (dy);
   else
     {
       *root_y -= height;