summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ChangeLog.pre-2-104
-rw-r--r--gdk/x11/gdkdnd-x11.c6
-rw-r--r--gdk/x11/gdkevents-x11.c4
-rw-r--r--gdk/x11/gdkgc-x11.c2
-rw-r--r--gdk/x11/gdkmain-x11.c2
-rw-r--r--gdk/x11/gdkwindow-x11.c37
-rw-r--r--gdk/x11/gdkxftdefaults.c3
-rw-r--r--gdk/x11/xsettings-client.c2
9 files changed, 25 insertions, 39 deletions
diff --git a/ChangeLog b/ChangeLog
index 4062131372..403ad254fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2005-09-13 Matthias Clasen <mclasen@redhat.com>
+ * gdk/*.c: Various cleanups. (#315359, Kjartan Maraas)
+
+2005-09-13 Matthias Clasen <mclasen@redhat.com>
+
* gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress):
Let GDK_Return pass through in some more cases.
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 4062131372..403ad254fe 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,9 @@
2005-09-13 Matthias Clasen <mclasen@redhat.com>
+ * gdk/*.c: Various cleanups. (#315359, Kjartan Maraas)
+
+2005-09-13 Matthias Clasen <mclasen@redhat.com>
+
* gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress):
Let GDK_Return pass through in some more cases.
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 0154954c14..de321428ee 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -539,7 +539,7 @@ get_client_window_at_coords_recurse (GdkDisplay *display,
unsigned int nchildren;
int i;
gboolean found_child = FALSE;
- GdkChildInfoX11 child;
+ GdkChildInfoX11 child = { 0, };
gboolean has_wm_state = FALSE;
if (!_gdk_x11_get_window_child_info (display, win, TRUE,
@@ -2394,7 +2394,7 @@ xdnd_send_motion (GdkDragContext *context,
static guint32
xdnd_check_dest (GdkDisplay *display,
Window win,
- gint *xdnd_version)
+ guint *xdnd_version)
{
gboolean retval = FALSE;
Atom type = None;
@@ -3012,7 +3012,7 @@ static guint32
_gdk_drag_get_protocol_for_display (GdkDisplay *display,
guint32 xid,
GdkDragProtocol *protocol,
- gint *version)
+ guint *version)
{
GdkWindow *window;
diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c
index 61ecdeb716..d2e6a0d7c3 100644
--- a/gdk/x11/gdkevents-x11.c
+++ b/gdk/x11/gdkevents-x11.c
@@ -592,7 +592,7 @@ translate_key_event (GdkDisplay *display,
{
GdkKeymap *keymap = gdk_keymap_get_for_display (display);
gunichar c = 0;
- guchar buf[7];
+ gchar buf[7];
event->key.type = xevent->xany.type == KeyPress ? GDK_KEY_PRESS : GDK_KEY_RELEASE;
event->key.time = xevent->xkey.time;
@@ -2627,7 +2627,7 @@ gdk_x11_screen_get_window_manager_name (GdkScreen *screen)
gint format;
gulong n_items;
gulong bytes_after;
- guchar *name;
+ gchar *name;
name = NULL;
diff --git a/gdk/x11/gdkgc-x11.c b/gdk/x11/gdkgc-x11.c
index 308a31cbdf..c9eee8db53 100644
--- a/gdk/x11/gdkgc-x11.c
+++ b/gdk/x11/gdkgc-x11.c
@@ -411,7 +411,7 @@ gdk_x11_gc_set_dashes (GdkGC *gc,
g_return_if_fail (dash_list != NULL);
XSetDashes (GDK_GC_XDISPLAY (gc), GDK_GC_XGC (gc),
- dash_offset, dash_list, n);
+ dash_offset, (char *)dash_list, n);
}
static void
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index ac1b01335e..7738abde73 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -547,7 +547,7 @@ _gdk_windowing_display_set_sm_client_id (GdkDisplay *display,
{
XChangeProperty (display_x11->xdisplay, display_x11->leader_window,
gdk_x11_get_xatom_by_name_for_display (display, "SM_CLIENT_ID"),
- XA_STRING, 8, PropModeReplace, sm_client_id,
+ XA_STRING, 8, PropModeReplace, (guchar *)sm_client_id,
strlen (sm_client_id));
}
else
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index f96e693e87..eeeb3e9a92 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -358,12 +358,10 @@ static GdkColormap*
gdk_window_impl_x11_get_colormap (GdkDrawable *drawable)
{
GdkDrawableImplX11 *drawable_impl;
- GdkWindowImplX11 *window_impl;
g_return_val_if_fail (GDK_IS_WINDOW_IMPL_X11 (drawable), NULL);
drawable_impl = GDK_DRAWABLE_IMPL_X11 (drawable);
- window_impl = GDK_WINDOW_IMPL_X11 (drawable);
if (!((GdkWindowObject *) drawable_impl->wrapper)->input_only &&
drawable_impl->colormap == NULL)
@@ -388,12 +386,10 @@ static void
gdk_window_impl_x11_set_colormap (GdkDrawable *drawable,
GdkColormap *cmap)
{
- GdkWindowImplX11 *impl;
GdkDrawableImplX11 *draw_impl;
g_return_if_fail (GDK_IS_WINDOW_IMPL_X11 (drawable));
- impl = GDK_WINDOW_IMPL_X11 (drawable);
draw_impl = GDK_DRAWABLE_IMPL_X11 (drawable);
if (cmap && GDK_WINDOW_DESTROYED (draw_impl->wrapper))
@@ -1846,7 +1842,6 @@ gdk_window_reparent (GdkWindow *window,
gint x,
gint y)
{
- GdkDisplay *display;
GdkWindowObject *window_private;
GdkWindowObject *parent_private;
GdkWindowObject *old_parent_private;
@@ -1866,8 +1861,6 @@ gdk_window_reparent (GdkWindow *window,
if (!new_parent)
new_parent = gdk_screen_get_root_window (GDK_WINDOW_SCREEN (window));
- display = GDK_WINDOW_DISPLAY (window);
-
window_private = (GdkWindowObject*) window;
old_parent_private = (GdkWindowObject*)window_private->parent;
parent_private = (GdkWindowObject*) new_parent;
@@ -2662,7 +2655,7 @@ set_text_property (GdkDisplay *display,
Atom property,
const gchar *utf8_str)
{
- guchar *prop_text = NULL;
+ gchar *prop_text = NULL;
Atom prop_type;
gint prop_length;
gint prop_format;
@@ -2682,7 +2675,7 @@ set_text_property (GdkDisplay *display,
gdk_utf8_to_compound_text_for_display (display,
utf8_str, &gdk_type, &prop_format,
- &prop_text, &prop_length);
+ (guchar **)&prop_text, &prop_length);
prop_type = gdk_x11_atom_to_xatom_for_display (display, gdk_type);
is_compound_text = TRUE;
}
@@ -2693,11 +2686,11 @@ set_text_property (GdkDisplay *display,
xwindow,
property,
prop_type, prop_format,
- PropModeReplace, prop_text,
+ PropModeReplace, (guchar *)prop_text,
prop_length);
if (is_compound_text)
- gdk_free_compound_text (prop_text);
+ gdk_free_compound_text ((guchar *)prop_text);
else
g_free (prop_text);
}
@@ -2713,7 +2706,7 @@ set_wm_name (GdkDisplay *display,
XChangeProperty (GDK_DISPLAY_XDISPLAY (display), xwindow,
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_NAME"),
gdk_x11_get_xatom_by_name_for_display (display, "UTF8_STRING"), 8,
- PropModeReplace, name, strlen (name));
+ PropModeReplace, (guchar *)name, strlen (name));
set_text_property (display, xwindow,
gdk_x11_get_xatom_by_name_for_display (display, "WM_NAME"),
@@ -2756,7 +2749,7 @@ gdk_window_set_title (GdkWindow *window,
XChangeProperty (xdisplay, xwindow,
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_ICON_NAME"),
gdk_x11_get_xatom_by_name_for_display (display, "UTF8_STRING"), 8,
- PropModeReplace, title, strlen (title));
+ PropModeReplace, (guchar *)title, strlen (title));
set_text_property (display, xwindow,
gdk_x11_get_xatom_by_name_for_display (display, "WM_ICON_NAME"),
@@ -2798,7 +2791,7 @@ gdk_window_set_role (GdkWindow *window,
if (role)
XChangeProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window),
gdk_x11_get_xatom_by_name_for_display (display, "WM_WINDOW_ROLE"),
- XA_STRING, 8, PropModeReplace, role, strlen (role));
+ XA_STRING, 8, PropModeReplace, (guchar *)role, strlen (role));
else
XDeleteProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window),
gdk_x11_get_xatom_by_name_for_display (display, "WM_WINDOW_ROLE"));
@@ -2823,14 +2816,8 @@ void
gdk_window_set_transient_for (GdkWindow *window,
GdkWindow *parent)
{
- GdkWindowObject *private;
- GdkWindowObject *parent_private;
-
g_return_if_fail (GDK_IS_WINDOW (window));
- private = (GdkWindowObject*) window;
- parent_private = (GdkWindowObject*) parent;
-
if (!GDK_WINDOW_DESTROYED (window) && !GDK_WINDOW_DESTROYED (parent))
XSetTransientForHint (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
@@ -4165,7 +4152,7 @@ gdk_window_set_icon_name (GdkWindow *window,
GDK_WINDOW_XID (window),
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_ICON_NAME"),
gdk_x11_get_xatom_by_name_for_display (display, "UTF8_STRING"), 8,
- PropModeReplace, name, strlen (name));
+ PropModeReplace, (guchar *)name, strlen (name));
set_text_property (display, GDK_WINDOW_XID (window),
gdk_x11_get_xatom_by_name_for_display (display, "WM_ICON_NAME"),
@@ -4186,15 +4173,11 @@ gdk_window_set_icon_name (GdkWindow *window,
void
gdk_window_iconify (GdkWindow *window)
{
- GdkWindowObject *private;
-
g_return_if_fail (GDK_IS_WINDOW (window));
if (GDK_WINDOW_DESTROYED (window))
return;
- private = (GdkWindowObject*) window;
-
if (GDK_WINDOW_IS_MAPPED (window))
{
XIconifyWindow (GDK_WINDOW_XDISPLAY (window),
@@ -4224,15 +4207,11 @@ gdk_window_iconify (GdkWindow *window)
void
gdk_window_deiconify (GdkWindow *window)
{
- GdkWindowObject *private;
-
g_return_if_fail (GDK_IS_WINDOW (window));
if (GDK_WINDOW_DESTROYED (window))
return;
- private = (GdkWindowObject*) window;
-
if (GDK_WINDOW_IS_MAPPED (window))
{
gdk_window_show (window);
diff --git a/gdk/x11/gdkxftdefaults.c b/gdk/x11/gdkxftdefaults.c
index 4accd9d351..dd792642c2 100644
--- a/gdk/x11/gdkxftdefaults.c
+++ b/gdk/x11/gdkxftdefaults.c
@@ -129,7 +129,6 @@ get_integer_default (Display *dpy,
gchar *option,
gint *value)
{
- gint i;
gchar *v, *e;
v = XGetDefault (dpy, "Xft", option);
@@ -138,7 +137,7 @@ get_integer_default (Display *dpy,
if (FcNameConstant ((FcChar8 *) v, value))
return TRUE;
- i = strtol (v, &e, 0);
+ *value = strtol (v, &e, 0);
if (e != v)
return TRUE;
}
diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c
index a965d20f07..d0ae1ec885 100644
--- a/gdk/x11/xsettings-client.c
+++ b/gdk/x11/xsettings-client.c
@@ -198,7 +198,7 @@ parse_settings (unsigned char *data,
buffer.pos = buffer.data = data;
buffer.len = len;
- result = fetch_card8 (&buffer, (char *)&buffer.byte_order);
+ result = fetch_card8 (&buffer, (unsigned char *)&buffer.byte_order);
if (buffer.byte_order != MSBFirst &&
buffer.byte_order != LSBFirst)
{