aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2005-12-02 14:55:14 +0000
committerJan Djärv2005-12-02 14:55:14 +0000
commit47c53789fd79f06a5e04dfe12b782a7321c3e00b (patch)
tree461f257d83d63c6f68d11edf7a90d71d09a2f56c /src
parent0a79da1b5da6fcf7f2444f75381411f48034afba (diff)
downloademacs-47c53789fd79f06a5e04dfe12b782a7321c3e00b.tar.gz
emacs-47c53789fd79f06a5e04dfe12b782a7321c3e00b.zip
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/xfns.c b/src/xfns.c
index c3eb173b4f9..e471b13f403 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -608,7 +608,7 @@ x_real_positions (f, xptr, yptr)
608 608
609 if (! had_errors) 609 if (! had_errors)
610 { 610 {
611 int ign; 611 unsigned int ign;
612 Window child, rootw; 612 Window child, rootw;
613 613
614 /* Get the real coordinates for the WM window upper left corner */ 614 /* Get the real coordinates for the WM window upper left corner */
@@ -794,9 +794,7 @@ xg_set_icon (f, file)
794 { 794 {
795 GdkPixbuf *pixbuf; 795 GdkPixbuf *pixbuf;
796 GError *err = NULL; 796 GError *err = NULL;
797 char *filename; 797 char *filename = (char *) SDATA (found);
798
799 filename = SDATA (found);
800 BLOCK_INPUT; 798 BLOCK_INPUT;
801 799
802 pixbuf = gdk_pixbuf_new_from_file (filename, &err); 800 pixbuf = gdk_pixbuf_new_from_file (filename, &err);
@@ -825,17 +823,12 @@ xg_set_icon_from_xpm_data (f, data)
825 char **data; 823 char **data;
826{ 824{
827 int result = 0; 825 int result = 0;
828 GError *err = NULL; 826 GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) data);
829 GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data);
830 827
831 if (!pixbuf) 828 if (!pixbuf)
832 { 829 return 0;
833 g_error_free (err);
834 return 0;
835 }
836 830
837 gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), 831 gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), pixbuf);
838 pixbuf);
839 g_object_unref (pixbuf); 832 g_object_unref (pixbuf);
840 return 1; 833 return 1;
841} 834}
@@ -1649,7 +1642,7 @@ x_set_name_internal (f, name)
1649 1642
1650#ifdef USE_GTK 1643#ifdef USE_GTK
1651 gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), 1644 gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
1652 SDATA (ENCODE_UTF_8 (name))); 1645 (char *) SDATA (ENCODE_UTF_8 (name)));
1653#else /* not USE_GTK */ 1646#else /* not USE_GTK */
1654 XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); 1647 XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
1655#endif /* not USE_GTK */ 1648#endif /* not USE_GTK */
@@ -3376,7 +3369,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3376 FRAME_OUTER_WINDOW (f), 3369 FRAME_OUTER_WINDOW (f),
3377 dpyinfo->Xatom_wm_client_leader, 3370 dpyinfo->Xatom_wm_client_leader,
3378 XA_WINDOW, 32, PropModeReplace, 3371 XA_WINDOW, 32, PropModeReplace,
3379 (char *) &dpyinfo->client_leader_window, 1); 3372 (unsigned char *) &dpyinfo->client_leader_window, 1);
3380 UNBLOCK_INPUT; 3373 UNBLOCK_INPUT;
3381 } 3374 }
3382 3375
@@ -4942,6 +4935,9 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
4942 *root_y = XINT (top); 4935 *root_y = XINT (top);
4943 else if (*root_y + XINT (dy) - height < 0) 4936 else if (*root_y + XINT (dy) - height < 0)
4944 *root_y -= XINT (dy); 4937 *root_y -= XINT (dy);
4938 else if (*root_y + XINT (dy) >= FRAME_X_DISPLAY_INFO (f)->height)
4939 /* Put tip above the pointer. */
4940 *root_y -= XINT (dy);
4945 else 4941 else
4946 { 4942 {
4947 *root_y -= height; 4943 *root_y -= height;