forked from AuroraMiddleware/gtk
x11: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
This commit is contained in:
parent
393df9f7e1
commit
fdb9a8e142
@ -610,12 +610,12 @@ _gdk_x11_get_window_child_info (GdkDisplay *display,
|
||||
{
|
||||
xResourceReq *resource_req;
|
||||
xGetPropertyReq *prop_req;
|
||||
Window window = state.children[i];
|
||||
Window win = state.children[i];
|
||||
|
||||
if (get_wm_state)
|
||||
{
|
||||
GetReq (GetProperty, prop_req);
|
||||
prop_req->window = window;
|
||||
prop_req->window = win;
|
||||
prop_req->property = wm_state_atom;
|
||||
prop_req->type = AnyPropertyType;
|
||||
prop_req->delete = False;
|
||||
@ -625,10 +625,10 @@ _gdk_x11_get_window_child_info (GdkDisplay *display,
|
||||
state.child_states[i].seq[CHILD_INFO_GET_PROPERTY] = dpy->request;
|
||||
}
|
||||
|
||||
GetResReq(GetWindowAttributes, window, resource_req);
|
||||
GetResReq(GetWindowAttributes, win, resource_req);
|
||||
state.child_states[i].seq[CHILD_INFO_GET_WA] = dpy->request;
|
||||
|
||||
GetResReq(GetGeometry, window, resource_req);
|
||||
GetResReq(GetGeometry, win, resource_req);
|
||||
state.child_states[i].seq[CHILD_INFO_GET_GEOMETRY] = dpy->request;
|
||||
}
|
||||
|
||||
|
@ -466,10 +466,9 @@ gdk_x11_device_core_window_at_position (GdkDevice *device,
|
||||
{
|
||||
gint width, height;
|
||||
GList *toplevels, *list;
|
||||
Window pointer_window, root, child;
|
||||
Window pointer_window;
|
||||
int rootx = -1, rooty = -1;
|
||||
int winx, winy;
|
||||
unsigned int xmask;
|
||||
|
||||
/* FIXME: untrusted clients case not multidevice-safe */
|
||||
pointer_window = None;
|
||||
|
@ -534,7 +534,7 @@ gdk_x11_device_xi2_window_at_position (GdkDevice *device,
|
||||
{
|
||||
gint width, height;
|
||||
GList *toplevels, *list;
|
||||
Window pointer_window, root, child;
|
||||
Window pointer_window;
|
||||
|
||||
/* FIXME: untrusted clients case not multidevice-safe */
|
||||
pointer_window = None;
|
||||
|
@ -214,7 +214,6 @@ translate_device_classes (GdkDisplay *display,
|
||||
case XIKeyClass:
|
||||
{
|
||||
XIKeyClassInfo *key_info = (XIKeyClassInfo *) class_info;
|
||||
gint i;
|
||||
|
||||
_gdk_device_set_keys (device, key_info->num_keycodes);
|
||||
|
||||
@ -1508,11 +1507,9 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
|
||||
if (gdk_device_get_mode (event->motion.device) == GDK_MODE_WINDOW)
|
||||
{
|
||||
GdkDevice *device = event->motion.device;
|
||||
|
||||
/* Update event coordinates from axes */
|
||||
gdk_device_get_axis (device, event->motion.axes, GDK_AXIS_X, &event->motion.x);
|
||||
gdk_device_get_axis (device, event->motion.axes, GDK_AXIS_Y, &event->motion.y);
|
||||
gdk_device_get_axis (event->motion.device, event->motion.axes, GDK_AXIS_X, &event->motion.x);
|
||||
gdk_device_get_axis (event->motion.device, event->motion.axes, GDK_AXIS_Y, &event->motion.y);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -151,7 +151,7 @@ _gdk_x11_display_free_translate_queue (GdkDisplay *display)
|
||||
|
||||
static void
|
||||
gdk_window_queue (GdkWindow *window,
|
||||
GdkWindowQueueItem *item)
|
||||
GdkWindowQueueItem *new_item)
|
||||
{
|
||||
GdkX11Display *display_x11 = GDK_X11_DISPLAY (GDK_WINDOW_DISPLAY (window));
|
||||
|
||||
@ -205,13 +205,13 @@ gdk_window_queue (GdkWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
item->window = window;
|
||||
item->serial = NextRequest (GDK_WINDOW_XDISPLAY (window));
|
||||
new_item->window = window;
|
||||
new_item->serial = NextRequest (GDK_WINDOW_XDISPLAY (window));
|
||||
|
||||
g_object_add_weak_pointer (G_OBJECT (window),
|
||||
(gpointer *)&(item->window));
|
||||
(gpointer *)&(new_item->window));
|
||||
|
||||
g_queue_push_tail (display_x11->translate_queue, item);
|
||||
g_queue_push_tail (display_x11->translate_queue, new_item);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -372,17 +372,17 @@ update_keymaps (GdkX11Keymap *keymap_x11)
|
||||
for (i = 0; i < map_size; i++)
|
||||
{
|
||||
/* Get the key code at this point in the map. */
|
||||
gint keycode = keymap_x11->mod_keymap->modifiermap[i];
|
||||
gint code = keymap_x11->mod_keymap->modifiermap[i];
|
||||
gint j;
|
||||
KeySym *syms;
|
||||
guint mask;
|
||||
|
||||
/* Ignore invalid keycodes. */
|
||||
if (keycode < keymap_x11->min_keycode ||
|
||||
keycode > keymap_x11->max_keycode)
|
||||
if (code < keymap_x11->min_keycode ||
|
||||
code > keymap_x11->max_keycode)
|
||||
continue;
|
||||
|
||||
syms = keymap_x11->keymap + (keycode - keymap_x11->min_keycode) * keymap_x11->keysyms_per_keycode;
|
||||
syms = keymap_x11->keymap + (code - keymap_x11->min_keycode) * keymap_x11->keysyms_per_keycode;
|
||||
|
||||
mask = 0;
|
||||
for (j = 0; j < keymap_x11->keysyms_per_keycode; j++)
|
||||
@ -398,7 +398,7 @@ update_keymaps (GdkX11Keymap *keymap_x11)
|
||||
mask |= GDK_SUPER_MASK;
|
||||
}
|
||||
|
||||
keymap_x11->modmap[i/keymap_x11->mod_keymap->max_keypermod] |= mask;
|
||||
keymap_x11->modmap[i / keymap_x11->mod_keymap->max_keypermod] |= mask;
|
||||
|
||||
/* The fourth modifier, GDK_MOD1_MASK is 1 << 3.
|
||||
* Each group of max_keypermod entries refers to the same modifier.
|
||||
|
@ -53,20 +53,6 @@ static gboolean gdk_visual_equal (Visual *a,
|
||||
Visual *b);
|
||||
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
|
||||
static const gchar *const visual_names[] =
|
||||
{
|
||||
"static gray",
|
||||
"grayscale",
|
||||
"static color",
|
||||
"pseudo color",
|
||||
"true color",
|
||||
"direct color",
|
||||
};
|
||||
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
G_DEFINE_TYPE (GdkX11Visual, gdk_x11_visual, GDK_TYPE_VISUAL)
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user