Patch from Kjartan Maraas to fix a lot of tiny issues (unused variable

2006-01-20  Elijah Newren  <newren gmail com>

	* src/async-getprop.c:
	* src/common.h:
	* src/display.c:
	* src/eggaccelerators.c:
	* src/frames.c:
	* src/gradient.c:
	* src/iconcache.c:
	* src/keybindings.c:
	* src/metaaccellabel.c:
	* src/place.c:
	* src/prefs.c:
	* src/preview-widget.c:
	* src/screen.c:
	* src/session.c:
	* src/stack.c:
	* src/tabpopup.c:
	* src/theme-viewer.c:
	* src/theme.c:
	* src/window-props.c:
	* src/window.c:
	* src/workspace.c:
	* src/tools/metacity-window-demo.c:
	* src/wm-tester/test-gravity.c:
	* src/wm-tester/test-resizing.c:
	* src/wm-tester/test-size-hints.c:
	Patch from Kjartan Maraas to fix a lot of tiny issues (unused
	variable removal, making unused variables used again, correction
	of types passed/declared for printf arguments, removal of unneeded
	breaks and returns, dead code removal, dead code revival, renaming
	to prevent shadowed variables, declaring unexported functions as
	static) spotted by the intel compiler.  #321439
This commit is contained in:
Elijah Newren 2006-01-20 22:03:56 +00:00 committed by Elijah Newren
parent 4c10722262
commit 32d4bd6b63
25 changed files with 140 additions and 223 deletions

View File

@ -1,3 +1,37 @@
2006-01-20 Elijah Newren <newren gmail com>
* src/async-getprop.c:
* src/common.h:
* src/display.c:
* src/eggaccelerators.c:
* src/frames.c:
* src/gradient.c:
* src/iconcache.c:
* src/keybindings.c:
* src/metaaccellabel.c:
* src/place.c:
* src/prefs.c:
* src/preview-widget.c:
* src/screen.c:
* src/session.c:
* src/stack.c:
* src/tabpopup.c:
* src/theme-viewer.c:
* src/theme.c:
* src/window-props.c:
* src/window.c:
* src/workspace.c:
* src/tools/metacity-window-demo.c:
* src/wm-tester/test-gravity.c:
* src/wm-tester/test-resizing.c:
* src/wm-tester/test-size-hints.c:
Patch from Kjartan Maraas to fix a lot of tiny issues (unused
variable removal, making unused variables used again, correction
of types passed/declared for printf arguments, removal of unneeded
breaks and returns, dead code removal, dead code revival, renaming
to prevent shadowed variables, declaring unexported functions as
static) spotted by the intel compiler. #321439
2006-01-20 Elijah Newren <newren gmail com> 2006-01-20 Elijah Newren <newren gmail com>
Patch from Björn Lindqvist to fix #98340. Patch from Björn Lindqvist to fix #98340.

View File

@ -522,7 +522,6 @@ ag_task_create (Display *dpy,
{ {
AgGetPropertyTask *task; AgGetPropertyTask *task;
xGetPropertyReq *req; xGetPropertyReq *req;
xError error;
AgPerDisplayData *dd; AgPerDisplayData *dd;
/* Fire up our request */ /* Fire up our request */
@ -543,8 +542,6 @@ ag_task_create (Display *dpy,
req->longOffset = offset; req->longOffset = offset;
req->longLength = length; req->longLength = length;
error.sequenceNumber = dpy->request;
/* Queue up our async task */ /* Queue up our async task */
task = Xcalloc (1, sizeof (AgGetPropertyTask)); task = Xcalloc (1, sizeof (AgGetPropertyTask));
if (task == NULL) if (task == NULL)

View File

@ -621,13 +621,9 @@ meta_display_open (const char *name)
* that will follow. * that will follow.
*/ */
{ {
XSetWindowAttributes attrs;
gulong data[1]; gulong data[1];
XEvent event; XEvent event;
attrs.event_mask = PropertyChangeMask;
attrs.override_redirect = True;
display->leader_window = meta_create_offscreen_window (display->xdisplay, display->leader_window = meta_create_offscreen_window (display->xdisplay,
DefaultRootWindow (display->xdisplay)); DefaultRootWindow (display->xdisplay));
@ -1067,7 +1063,6 @@ grab_op_is_mouse (MetaGrabOp op)
case META_GRAB_OP_KEYBOARD_RESIZING_NW: case META_GRAB_OP_KEYBOARD_RESIZING_NW:
case META_GRAB_OP_KEYBOARD_MOVING: case META_GRAB_OP_KEYBOARD_MOVING:
return TRUE; return TRUE;
break;
default: default:
return FALSE; return FALSE;
@ -1095,7 +1090,6 @@ grab_op_is_keyboard (MetaGrabOp op)
case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK: case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
case META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING: case META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING:
return TRUE; return TRUE;
break;
default: default:
return FALSE; return FALSE;
@ -1125,7 +1119,6 @@ meta_grab_op_is_resizing (MetaGrabOp op)
case META_GRAB_OP_KEYBOARD_RESIZING_SW: case META_GRAB_OP_KEYBOARD_RESIZING_SW:
case META_GRAB_OP_KEYBOARD_RESIZING_NW: case META_GRAB_OP_KEYBOARD_RESIZING_NW:
return TRUE; return TRUE;
break;
default: default:
return FALSE; return FALSE;
@ -1140,7 +1133,6 @@ meta_grab_op_is_moving (MetaGrabOp op)
case META_GRAB_OP_MOVING: case META_GRAB_OP_MOVING:
case META_GRAB_OP_KEYBOARD_MOVING: case META_GRAB_OP_KEYBOARD_MOVING:
return TRUE; return TRUE;
break;
default: default:
return FALSE; return FALSE;
@ -1267,6 +1259,7 @@ window_raise_with_delay_callback (void *data)
Window root, child; Window root, child;
unsigned int mask; unsigned int mask;
gboolean same_screen; gboolean same_screen;
gboolean point_in_window;
meta_error_trap_push (window->display); meta_error_trap_push (window->display);
same_screen = XQueryPointer (window->display->xdisplay, same_screen = XQueryPointer (window->display->xdisplay,
@ -1275,8 +1268,10 @@ window_raise_with_delay_callback (void *data)
&root_x, &root_y, &x, &y, &mask); &root_x, &root_y, &x, &y, &mask);
meta_error_trap_pop (window->display, TRUE); meta_error_trap_pop (window->display, TRUE);
if ((window->frame && POINT_IN_RECT (root_x, root_y, window->frame->rect)) || point_in_window =
(window->frame == NULL && POINT_IN_RECT (root_x, root_y, window->rect))) (window->frame && POINT_IN_RECT (root_x, root_y, window->frame->rect)) ||
(window->frame == NULL && POINT_IN_RECT (root_x, root_y, window->rect));
if (same_screen && point_in_window)
meta_window_raise (window); meta_window_raise (window);
else else
meta_topic (META_DEBUG_FOCUS, meta_topic (META_DEBUG_FOCUS,
@ -1629,7 +1624,7 @@ event_callback (XEvent *event,
grab_op_is_keyboard (display->grab_op)) grab_op_is_keyboard (display->grab_op))
{ {
meta_topic (META_DEBUG_WINDOW_OPS, meta_topic (META_DEBUG_WINDOW_OPS,
"Ending grab op %d on window %s due to button press\n", "Ending grab op %u on window %s due to button press\n",
display->grab_op, display->grab_op,
(display->grab_window ? (display->grab_window ?
display->grab_window->desc : display->grab_window->desc :
@ -1685,7 +1680,7 @@ event_callback (XEvent *event,
if (window->type != META_WINDOW_DOCK) if (window->type != META_WINDOW_DOCK)
{ {
meta_topic (META_DEBUG_FOCUS, meta_topic (META_DEBUG_FOCUS,
"Focusing %s due to unmodified button %d press (display.c)\n", "Focusing %s due to unmodified button %u press (display.c)\n",
window->desc, event->xbutton.button); window->desc, event->xbutton.button);
meta_window_focus (window, event->xbutton.time); meta_window_focus (window, event->xbutton.time);
} }
@ -2200,7 +2195,6 @@ event_callback (XEvent *event,
* closing the display... so return right away. * closing the display... so return right away.
*/ */
return FALSE; return FALSE;
break;
case SelectionRequest: case SelectionRequest:
process_selection_request (display, event); process_selection_request (display, event);
break; break;
@ -2699,7 +2693,7 @@ meta_spew_event (MetaDisplay *display,
break; break;
case ButtonPress: case ButtonPress:
name = "ButtonPress"; name = "ButtonPress";
extra = g_strdup_printf ("button %d state 0x%x x %d y %d root 0x%lx same_screen %d", extra = g_strdup_printf ("button %u state 0x%x x %d y %d root 0x%lx same_screen %d",
event->xbutton.button, event->xbutton.button,
event->xbutton.state, event->xbutton.state,
event->xbutton.x, event->xbutton.x,
@ -2709,7 +2703,7 @@ meta_spew_event (MetaDisplay *display,
break; break;
case ButtonRelease: case ButtonRelease:
name = "ButtonRelease"; name = "ButtonRelease";
extra = g_strdup_printf ("button %d state 0x%x x %d y %d root 0x%lx same_screen %d", extra = g_strdup_printf ("button %u state 0x%x x %d y %d root 0x%lx same_screen %d",
event->xbutton.button, event->xbutton.button,
event->xbutton.state, event->xbutton.state,
event->xbutton.x, event->xbutton.x,
@ -2951,7 +2945,7 @@ meta_spew_event (MetaDisplay *display,
extra = extra =
g_strdup_printf ("kind: %s " g_strdup_printf ("kind: %s "
"x: %d y: %d w: %d h: %d " "x: %d y: %d w: %u h: %u "
"shaped: %d", "shaped: %d",
sev->kind == ShapeBounding ? sev->kind == ShapeBounding ?
"ShapeBounding" : "ShapeBounding" :
@ -3235,13 +3229,13 @@ meta_display_begin_grab_op (MetaDisplay *display,
Window grab_xwindow; Window grab_xwindow;
meta_topic (META_DEBUG_WINDOW_OPS, meta_topic (META_DEBUG_WINDOW_OPS,
"Doing grab op %d on window %s button %d pointer already grabbed: %d pointer pos %d,%d\n", "Doing grab op %u on window %s button %d pointer already grabbed: %d pointer pos %d,%d\n",
op, window ? window->desc : "none", button, pointer_already_grabbed, op, window ? window->desc : "none", button, pointer_already_grabbed,
root_x, root_y); root_x, root_y);
if (display->grab_op != META_GRAB_OP_NONE) if (display->grab_op != META_GRAB_OP_NONE)
{ {
meta_warning ("Attempt to perform window operation %d on window %s when operation %d on %s already in effect\n", meta_warning ("Attempt to perform window operation %u on window %s when operation %u on %s already in effect\n",
op, window ? window->desc : "none", display->grab_op, op, window ? window->desc : "none", display->grab_op,
display->grab_window ? display->grab_window->desc : "none"); display->grab_window ? display->grab_window->desc : "none");
return FALSE; return FALSE;
@ -3414,7 +3408,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
} }
meta_topic (META_DEBUG_WINDOW_OPS, meta_topic (META_DEBUG_WINDOW_OPS,
"Grab op %d on window %s successful\n", "Grab op %u on window %s successful\n",
display->grab_op, window ? window->desc : "(null)"); display->grab_op, window ? window->desc : "(null)");
g_assert (display->grab_window != NULL || display->grab_screen != NULL); g_assert (display->grab_window != NULL || display->grab_screen != NULL);
@ -3488,7 +3482,7 @@ meta_display_end_grab_op (MetaDisplay *display,
Time timestamp) Time timestamp)
{ {
meta_topic (META_DEBUG_WINDOW_OPS, meta_topic (META_DEBUG_WINDOW_OPS,
"Ending grab op %d at time %lu\n", display->grab_op, "Ending grab op %u at time %lu\n", display->grab_op,
(unsigned long) timestamp); (unsigned long) timestamp);
if (display->grab_op == META_GRAB_OP_NONE) if (display->grab_op == META_GRAB_OP_NONE)
@ -4087,7 +4081,7 @@ process_request_frame_extents (MetaDisplay *display,
meta_topic (META_DEBUG_GEOMETRY, meta_topic (META_DEBUG_GEOMETRY,
"Setting _NET_FRAME_EXTENTS on unmanaged window 0x%lx " "Setting _NET_FRAME_EXTENTS on unmanaged window 0x%lx "
"to top = %ld, left = %ld, bottom = %ld, right = %ld\n", "to top = %lu, left = %lu, bottom = %lu, right = %lu\n",
xwindow, data[0], data[1], data[2], data[3]); xwindow, data[0], data[1], data[2], data[3]);
meta_error_trap_push (display); meta_error_trap_push (display);
@ -4309,6 +4303,7 @@ meta_display_get_tab_next (MetaDisplay *display,
{ {
gboolean skip; gboolean skip;
GList *tab_list; GList *tab_list;
MetaWindow *ret;
tab_list = meta_display_get_tab_list(display, tab_list = meta_display_get_tab_list(display,
type, type,
screen, screen,
@ -4322,27 +4317,30 @@ meta_display_get_tab_next (MetaDisplay *display,
g_assert (window->display == display); g_assert (window->display == display);
if (backward) if (backward)
return find_tab_backward (display, type, screen, workspace, ret = find_tab_backward (display, type, screen, workspace,
g_list_find (tab_list,
window),
TRUE);
else
return find_tab_forward (display, type, screen, workspace,
g_list_find (tab_list, g_list_find (tab_list,
window), window),
TRUE); TRUE);
else
ret = find_tab_forward (display, type, screen, workspace,
g_list_find (tab_list,
window),
TRUE);
}
else
{
skip = display->focus_window != NULL &&
IN_TAB_CHAIN (display->focus_window, type);
if (backward)
ret = find_tab_backward (display, type, screen, workspace,
tab_list, skip);
else
ret = find_tab_forward (display, type, screen, workspace,
tab_list, skip);
} }
skip = display->focus_window != NULL &&
IN_TAB_CHAIN (display->focus_window, type);
if (backward)
return find_tab_backward (display, type, screen, workspace,
tab_list, skip);
else
return find_tab_forward (display, type, screen, workspace,
tab_list, skip);
g_list_free (tab_list); g_list_free (tab_list);
return ret;
} }
MetaWindow* MetaWindow*
@ -4846,9 +4844,6 @@ timestamp_too_old (MetaDisplay *display,
* timestamp_too_old_or_in_future). * timestamp_too_old_or_in_future).
*/ */
MetaWindow *focus_window;
focus_window = display->focus_window;
if (*timestamp == CurrentTime) if (*timestamp == CurrentTime)
{ {
meta_warning ("Got a request to focus %s with a timestamp of 0. This " meta_warning ("Got a request to focus %s with a timestamp of 0. This "

View File

@ -45,7 +45,7 @@ typedef struct
} EggModmap; } EggModmap;
const EggModmap* egg_keymap_get_modmap (GdkKeymap *keymap); static const EggModmap* egg_keymap_get_modmap (GdkKeymap *keymap);
static inline gboolean static inline gboolean
is_alt (const gchar *string) is_alt (const gchar *string)

View File

@ -640,10 +640,6 @@ meta_frames_unmanage_window (MetaFrames *frames,
static void static void
meta_frames_realize (GtkWidget *widget) meta_frames_realize (GtkWidget *widget)
{ {
MetaFrames *frames;
frames = META_FRAMES (widget);
if (GTK_WIDGET_CLASS (parent_class)->realize) if (GTK_WIDGET_CLASS (parent_class)->realize)
GTK_WIDGET_CLASS (parent_class)->realize (widget); GTK_WIDGET_CLASS (parent_class)->realize (widget);
} }
@ -651,10 +647,6 @@ meta_frames_realize (GtkWidget *widget)
static void static void
meta_frames_unrealize (GtkWidget *widget) meta_frames_unrealize (GtkWidget *widget)
{ {
MetaFrames *frames;
frames = META_FRAMES (widget);
if (GTK_WIDGET_CLASS (parent_class)->unrealize) if (GTK_WIDGET_CLASS (parent_class)->unrealize)
GTK_WIDGET_CLASS (parent_class)->unrealize (widget); GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
} }
@ -709,11 +701,8 @@ void
meta_frames_reset_bg (MetaFrames *frames, meta_frames_reset_bg (MetaFrames *frames,
Window xwindow) Window xwindow)
{ {
GtkWidget *widget;
MetaUIFrame *frame; MetaUIFrame *frame;
widget = GTK_WIDGET (frames);
frame = meta_frames_lookup_window (frames, xwindow); frame = meta_frames_lookup_window (frames, xwindow);
meta_frames_set_window_background (frames, frame); meta_frames_set_window_background (frames, frame);
@ -736,11 +725,8 @@ meta_frames_unflicker_bg (MetaFrames *frames,
int target_width, int target_width,
int target_height) int target_height)
{ {
GtkWidget *widget;
MetaUIFrame *frame; MetaUIFrame *frame;
widget = GTK_WIDGET (frames);
frame = meta_frames_lookup_window (frames, xwindow); frame = meta_frames_lookup_window (frames, xwindow);
g_return_if_fail (frame != NULL); g_return_if_fail (frame != NULL);
@ -766,15 +752,12 @@ meta_frames_apply_shapes (MetaFrames *frames,
{ {
#ifdef HAVE_SHAPE #ifdef HAVE_SHAPE
/* Apply shapes as if window had new_window_width, new_window_height */ /* Apply shapes as if window had new_window_width, new_window_height */
GtkWidget *widget;
MetaUIFrame *frame; MetaUIFrame *frame;
MetaFrameGeometry fgeom; MetaFrameGeometry fgeom;
XRectangle xrect; XRectangle xrect;
Region corners_xregion; Region corners_xregion;
Region window_xregion; Region window_xregion;
widget = GTK_WIDGET (frames);
frame = meta_frames_lookup_window (frames, xwindow); frame = meta_frames_lookup_window (frames, xwindow);
g_return_if_fail (frame != NULL); g_return_if_fail (frame != NULL);
@ -1036,11 +1019,8 @@ void
meta_frames_queue_draw (MetaFrames *frames, meta_frames_queue_draw (MetaFrames *frames,
Window xwindow) Window xwindow)
{ {
GtkWidget *widget;
MetaUIFrame *frame; MetaUIFrame *frame;
widget = GTK_WIDGET (frames);
frame = meta_frames_lookup_window (frames, xwindow); frame = meta_frames_lookup_window (frames, xwindow);
invalidate_whole_window (frames, frame); invalidate_whole_window (frames, frame);
@ -1051,11 +1031,8 @@ meta_frames_set_title (MetaFrames *frames,
Window xwindow, Window xwindow,
const char *title) const char *title)
{ {
GtkWidget *widget;
MetaUIFrame *frame; MetaUIFrame *frame;
widget = GTK_WIDGET (frames);
frame = meta_frames_lookup_window (frames, xwindow); frame = meta_frames_lookup_window (frames, xwindow);
g_assert (frame); g_assert (frame);
@ -1076,11 +1053,8 @@ void
meta_frames_repaint_frame (MetaFrames *frames, meta_frames_repaint_frame (MetaFrames *frames,
Window xwindow) Window xwindow)
{ {
GtkWidget *widget;
MetaUIFrame *frame; MetaUIFrame *frame;
widget = GTK_WIDGET (frames);
frame = meta_frames_lookup_window (frames, xwindow); frame = meta_frames_lookup_window (frames, xwindow);
g_assert (frame); g_assert (frame);
@ -1307,8 +1281,6 @@ meta_frames_button_press_event (GtkWidget *widget,
case META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE: case META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE:
{ {
MetaFrameFlags flags;
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow); flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
if (flags & META_FRAME_ALLOWS_MAXIMIZE) if (flags & META_FRAME_ALLOWS_MAXIMIZE)
@ -1628,7 +1600,7 @@ meta_frames_update_prelit_control (MetaFrames *frames,
MetaFrameControl old_control; MetaFrameControl old_control;
MetaCursor cursor; MetaCursor cursor;
meta_verbose ("Updating prelit control from %d to %d\n", meta_verbose ("Updating prelit control from %u to %u\n",
frame->prelit_control, control); frame->prelit_control, control);
cursor = META_CURSOR_DEFAULT; cursor = META_CURSOR_DEFAULT;

View File

@ -401,8 +401,6 @@ meta_gradient_create_diagonal (int width, int height,
int j; int j;
float a, offset; float a, offset;
unsigned char *ptr; unsigned char *ptr;
int r0, g0, b0;
int rf, gf, bf;
unsigned char *pixels; unsigned char *pixels;
int rowstride; int rowstride;
@ -425,13 +423,6 @@ meta_gradient_create_diagonal (int width, int height,
return NULL; return NULL;
} }
r0 = (guchar) (from->red / 256.0);
g0 = (guchar) (from->green / 256.0);
b0 = (guchar) (from->blue / 256.0);
rf = (guchar) (to->red / 256.0);
gf = (guchar) (to->green / 256.0);
bf = (guchar) (to->blue / 256.0);
ptr = gdk_pixbuf_get_pixels (tmp); ptr = gdk_pixbuf_get_pixels (tmp);
a = ((float)(width - 1))/((float)(height - 1)); a = ((float)(width - 1))/((float)(height - 1));

View File

@ -56,9 +56,6 @@ find_largest_sizes (gulong *data,
while (nitems > 0) while (nitems > 0)
{ {
int w, h; int w, h;
gboolean replace;
replace = FALSE;
if (nitems < 3) if (nitems < 3)
return FALSE; /* no space for w, h */ return FALSE; /* no space for w, h */

View File

@ -1684,7 +1684,7 @@ meta_display_process_key_event (MetaDisplay *display,
if (!handled) if (!handled)
{ {
meta_topic (META_DEBUG_KEYBINDINGS, meta_topic (META_DEBUG_KEYBINDINGS,
"Ending grab op %d on key event sym %s\n", "Ending grab op %u on key event sym %s\n",
display->grab_op, XKeysymToString (keysym)); display->grab_op, XKeysymToString (keysym));
meta_display_end_grab_op (display, event->xkey.time); meta_display_end_grab_op (display, event->xkey.time);
} }
@ -2912,7 +2912,7 @@ do_choose_window (MetaDisplay *display,
type = GPOINTER_TO_INT (binding->handler->data); type = GPOINTER_TO_INT (binding->handler->data);
meta_topic (META_DEBUG_KEYBINDINGS, meta_topic (META_DEBUG_KEYBINDINGS,
"Tab list = %d show_popup = %d\n", type, show_popup); "Tab list = %u show_popup = %d\n", type, show_popup);
/* reverse direction if shift is down */ /* reverse direction if shift is down */
if (event->xkey.state & ShiftMask) if (event->xkey.state & ShiftMask)

View File

@ -49,7 +49,6 @@ static void meta_accel_label_update (MetaAccelLabel *accel_label);
static int meta_accel_label_get_accel_width (MetaAccelLabel *accel_label); static int meta_accel_label_get_accel_width (MetaAccelLabel *accel_label);
static MetaAccelLabelClass *accel_label_class = NULL;
static GtkLabelClass *parent_class = NULL; static GtkLabelClass *parent_class = NULL;
@ -85,7 +84,6 @@ meta_accel_label_class_init (MetaAccelLabelClass *class)
GtkObjectClass *object_class = GTK_OBJECT_CLASS (class); GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
accel_label_class = class;
parent_class = g_type_class_peek_parent (class); parent_class = g_type_class_peek_parent (class);
gobject_class->finalize = meta_accel_label_finalize; gobject_class->finalize = meta_accel_label_finalize;

View File

@ -738,7 +738,6 @@ meta_window_place (MetaWindow *window,
case META_WINDOW_MENU: case META_WINDOW_MENU:
case META_WINDOW_UTILITY: case META_WINDOW_UTILITY:
goto done_no_constraints; goto done_no_constraints;
break;
} }
if (meta_prefs_get_disable_workarounds ()) if (meta_prefs_get_disable_workarounds ())

View File

@ -1583,36 +1583,30 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_BUTTON_LAYOUT: case META_PREF_BUTTON_LAYOUT:
return "BUTTON_LAYOUT"; return "BUTTON_LAYOUT";
break;
case META_PREF_WORKSPACE_NAMES: case META_PREF_WORKSPACE_NAMES:
return "WORKSPACE_NAMES"; return "WORKSPACE_NAMES";
break;
case META_PREF_VISUAL_BELL: case META_PREF_VISUAL_BELL:
return "VISUAL_BELL"; return "VISUAL_BELL";
break;
case META_PREF_AUDIBLE_BELL: case META_PREF_AUDIBLE_BELL:
return "AUDIBLE_BELL"; return "AUDIBLE_BELL";
break;
case META_PREF_VISUAL_BELL_TYPE: case META_PREF_VISUAL_BELL_TYPE:
return "VISUAL_BELL_TYPE"; return "VISUAL_BELL_TYPE";
break;
case META_PREF_REDUCED_RESOURCES: case META_PREF_REDUCED_RESOURCES:
return "REDUCED_RESOURCES"; return "REDUCED_RESOURCES";
break;
case META_PREF_GNOME_ACCESSIBILITY: case META_PREF_GNOME_ACCESSIBILITY:
return "GNOME_ACCESSIBILTY"; return "GNOME_ACCESSIBILTY";
break;
case META_PREF_CURSOR_THEME: case META_PREF_CURSOR_THEME:
return "CURSOR_THEME"; return "CURSOR_THEME";
break;
case META_PREF_CURSOR_SIZE: case META_PREF_CURSOR_SIZE:
return "CURSOR_SIZE"; return "CURSOR_SIZE";
break;
} }
return "(unknown)"; return "(unknown)";

View File

@ -62,10 +62,8 @@ static void
meta_preview_class_init (MetaPreviewClass *class) meta_preview_class_init (MetaPreviewClass *class)
{ {
GObjectClass *gobject_class = G_OBJECT_CLASS (class); GObjectClass *gobject_class = G_OBJECT_CLASS (class);
GtkObjectClass *object_class;
GtkWidgetClass *widget_class; GtkWidgetClass *widget_class;
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class; widget_class = (GtkWidgetClass*) class;
parent_class = gtk_type_class (GTK_TYPE_BIN); parent_class = gtk_type_class (GTK_TYPE_BIN);
@ -128,10 +126,6 @@ meta_preview_new (void)
static void static void
meta_preview_finalize (GObject *object) meta_preview_finalize (GObject *object)
{ {
MetaPreview *preview;
preview = META_PREVIEW (object);
G_OBJECT_CLASS (parent_class)->finalize (object); G_OBJECT_CLASS (parent_class)->finalize (object);
} }

View File

@ -982,7 +982,7 @@ set_number_of_spaces_hint (MetaScreen *screen,
data[0] = n_spaces; data[0] = n_spaces;
meta_verbose ("Setting _NET_NUMBER_OF_DESKTOPS to %ld\n", data[0]); meta_verbose ("Setting _NET_NUMBER_OF_DESKTOPS to %lu\n", data[0]);
meta_error_trap_push (screen->display); meta_error_trap_push (screen->display);
XChangeProperty (screen->display->xdisplay, screen->xroot, XChangeProperty (screen->display->xdisplay, screen->xroot,
@ -1003,7 +1003,7 @@ set_desktop_geometry_hint (MetaScreen *screen)
data[0] = screen->rect.width; data[0] = screen->rect.width;
data[1] = screen->rect.height; data[1] = screen->rect.height;
meta_verbose ("Setting _NET_DESKTOP_GEOMETRY to %ld, %ld\n", data[0], data[1]); meta_verbose ("Setting _NET_DESKTOP_GEOMETRY to %lu, %lu\n", data[0], data[1]);
meta_error_trap_push (screen->display); meta_error_trap_push (screen->display);
XChangeProperty (screen->display->xdisplay, screen->xroot, XChangeProperty (screen->display->xdisplay, screen->xroot,
@ -1672,7 +1672,7 @@ meta_screen_update_workspace_layout (MetaScreen *screen)
meta_XFree (list); meta_XFree (list);
} }
meta_verbose ("Workspace layout rows = %d cols = %d orientation = %d starting corner = %d\n", meta_verbose ("Workspace layout rows = %d cols = %d orientation = %d starting corner = %u\n",
screen->rows_of_workspaces, screen->rows_of_workspaces,
screen->columns_of_workspaces, screen->columns_of_workspaces,
screen->vertical_workspaces, screen->vertical_workspaces,

View File

@ -673,31 +673,22 @@ window_type_to_string (MetaWindowType type)
{ {
case META_WINDOW_NORMAL: case META_WINDOW_NORMAL:
return "normal"; return "normal";
break;
case META_WINDOW_DESKTOP: case META_WINDOW_DESKTOP:
return "desktop"; return "desktop";
break;
case META_WINDOW_DOCK: case META_WINDOW_DOCK:
return "dock"; return "dock";
break;
case META_WINDOW_DIALOG: case META_WINDOW_DIALOG:
return "dialog"; return "dialog";
break;
case META_WINDOW_MODAL_DIALOG: case META_WINDOW_MODAL_DIALOG:
return "modal_dialog"; return "modal_dialog";
break;
case META_WINDOW_TOOLBAR: case META_WINDOW_TOOLBAR:
return "toolbar"; return "toolbar";
break;
case META_WINDOW_MENU: case META_WINDOW_MENU:
return "menu"; return "menu";
break;
case META_WINDOW_SPLASHSCREEN: case META_WINDOW_SPLASHSCREEN:
return "splashscreen"; return "splashscreen";
break;
case META_WINDOW_UTILITY: case META_WINDOW_UTILITY:
return "utility"; return "utility";
break;
} }
return ""; return "";
@ -1485,10 +1476,6 @@ text_handler (GMarkupParseContext *context,
gpointer user_data, gpointer user_data,
GError **error) GError **error)
{ {
ParseData *pd;
pd = user_data;
/* Right now we don't have any elements where we care about their /* Right now we don't have any elements where we care about their
* content * content
*/ */
@ -1617,8 +1604,6 @@ find_best_match (GSList *infos,
return matching_type; return matching_type;
else else
return infos->data; return infos->data;
return NULL;
} }
const MetaWindowSessionInfo* const MetaWindowSessionInfo*

View File

@ -367,13 +367,13 @@ compute_layer (MetaWindow *window)
if (group_max > window->layer) if (group_max > window->layer)
{ {
meta_topic (META_DEBUG_STACK, meta_topic (META_DEBUG_STACK,
"Promoting window %s from layer %d to %d due to group membership\n", "Promoting window %s from layer %u to %u due to group membership\n",
window->desc, window->layer, group_max); window->desc, window->layer, group_max);
window->layer = group_max; window->layer = group_max;
} }
} }
meta_topic (META_DEBUG_STACK, "Window %s on layer %d type = %d has_focus = %d\n", meta_topic (META_DEBUG_STACK, "Window %s on layer %u type = %u has_focus = %d\n",
window->desc, window->layer, window->desc, window->layer,
window->type, window->has_focus); window->type, window->has_focus);
} }
@ -667,7 +667,7 @@ ensure_above (MetaWindow *above,
above->layer < below->layer) above->layer < below->layer)
{ {
meta_topic (META_DEBUG_STACK, meta_topic (META_DEBUG_STACK,
"Promoting window %s from layer %d to %d due to contraint\n", "Promoting window %s from layer %u to %u due to contraint\n",
above->desc, above->layer, below->layer); above->desc, above->layer, below->layer);
above->layer = below->layer; above->layer = below->layer;
} }
@ -887,7 +887,7 @@ meta_stack_ensure_sorted (MetaStack *stack)
if (w->layer != old_layer) if (w->layer != old_layer)
{ {
meta_topic (META_DEBUG_STACK, meta_topic (META_DEBUG_STACK,
"Window %s moved from layer %d to %d\n", "Window %s moved from layer %u to %u\n",
w->desc, old_layer, w->layer); w->desc, old_layer, w->layer);
stack->need_resort = TRUE; stack->need_resort = TRUE;
@ -939,7 +939,7 @@ raise_window_relative_to_managed_windows (MetaScreen *screen,
Window ignored1, ignored2; Window ignored1, ignored2;
Window *children; Window *children;
int n_children; unsigned int n_children;
int i; int i;
/* Normally XQueryTree() means "must grab server" but here /* Normally XQueryTree() means "must grab server" but here
@ -1063,7 +1063,7 @@ meta_stack_sync_to_server (MetaStack *stack)
else else
g_array_append_val (root_children_stacked, w->xwindow); g_array_append_val (root_children_stacked, w->xwindow);
meta_topic (META_DEBUG_STACK, "%d:%d - %s ", w->layer, w->stack_position, w->desc); meta_topic (META_DEBUG_STACK, "%u:%d - %s ", w->layer, w->stack_position, w->desc);
tmp = tmp->next; tmp = tmp->next;
} }
@ -1073,12 +1073,12 @@ meta_stack_sync_to_server (MetaStack *stack)
/* All windows should be in some stacking order */ /* All windows should be in some stacking order */
if (stacked->len != stack->windows->len) if (stacked->len != stack->windows->len)
meta_bug ("%d windows stacked, %d windows exist in stack\n", meta_bug ("%u windows stacked, %u windows exist in stack\n",
stacked->len, stack->windows->len); stacked->len, stack->windows->len);
/* Sync to server */ /* Sync to server */
meta_topic (META_DEBUG_STACK, "Restacking %d windows\n", meta_topic (META_DEBUG_STACK, "Restacking %u windows\n",
root_children_stacked->len); root_children_stacked->len);
meta_error_trap_push (stack->screen->display); meta_error_trap_push (stack->screen->display);

View File

@ -205,28 +205,28 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
te->title = NULL; te->title = NULL;
if (entries[i].title) if (entries[i].title)
{ {
gchar *tmp; gchar *temp;
if (entries[i].hidden) if (entries[i].hidden)
{ {
tmp = g_markup_printf_escaped ("[%s]", entries[i].title); temp = g_markup_printf_escaped ("[%s]", entries[i].title);
} }
else else
{ {
tmp = g_markup_printf_escaped ("%s", entries[i].title); temp = g_markup_printf_escaped ("%s", entries[i].title);
} }
if (entries[i].demands_attention) if (entries[i].demands_attention)
{ {
gchar *escaped, *markup; gchar *escaped, *markup;
escaped = g_markup_escape_text (tmp, -1); escaped = g_markup_escape_text (temp, -1);
markup = g_strdup_printf ("<b>%s</b>", escaped); markup = g_strdup_printf ("<b>%s</b>", escaped);
g_free (escaped); g_free (escaped);
g_free (tmp); g_free (temp);
tmp = markup; temp = markup;
} }
te->title = meta_g_utf8_strndup (tmp, max_chars_per_title); te->title = meta_g_utf8_strndup (temp, max_chars_per_title);
g_free (tmp); g_free (temp);
} }
te->widget = NULL; te->widget = NULL;
te->icon = entries[i].icon; te->icon = entries[i].icon;

View File

@ -61,7 +61,9 @@ static GtkWidget *previews[META_FRAME_TYPE_LAST*FONT_SIZE_LAST + BUTTON_LAYOUT_C
static double milliseconds_to_draw_frame = 0.0; static double milliseconds_to_draw_frame = 0.0;
static void run_position_expression_tests (void); static void run_position_expression_tests (void);
#if 0
static void run_position_expression_timings (void); static void run_position_expression_timings (void);
#endif
static void run_theme_benchmark (void); static void run_theme_benchmark (void);
@ -90,7 +92,6 @@ normal_contents (void)
GtkWidget *statusbar; GtkWidget *statusbar;
GtkWidget *contents; GtkWidget *contents;
GtkWidget *sw; GtkWidget *sw;
GtkTextBuffer *buffer;
GtkItemFactory *item_factory; GtkItemFactory *item_factory;
table = gtk_table_new (1, 4, FALSE); table = gtk_table_new (1, 4, FALSE);
@ -194,9 +195,6 @@ normal_contents (void)
GTK_EXPAND | GTK_FILL, 0, GTK_EXPAND | GTK_FILL, 0,
0, 0); 0, 0);
/* Show text widget info in the statusbar */
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (contents));
gtk_widget_show_all (table); gtk_widget_show_all (table);
return table; return table;
@ -376,32 +374,26 @@ get_window_contents (MetaFrameType type,
case META_FRAME_TYPE_NORMAL: case META_FRAME_TYPE_NORMAL:
*title = _("Normal Application Window"); *title = _("Normal Application Window");
return normal_contents (); return normal_contents ();
break;
case META_FRAME_TYPE_DIALOG: case META_FRAME_TYPE_DIALOG:
*title = _("Dialog Box"); *title = _("Dialog Box");
return dialog_contents (); return dialog_contents ();
break;
case META_FRAME_TYPE_MODAL_DIALOG: case META_FRAME_TYPE_MODAL_DIALOG:
*title = _("Modal Dialog Box"); *title = _("Modal Dialog Box");
return dialog_contents (); return dialog_contents ();
break;
case META_FRAME_TYPE_UTILITY: case META_FRAME_TYPE_UTILITY:
*title = _("Utility Palette"); *title = _("Utility Palette");
return utility_contents (); return utility_contents ();
break;
case META_FRAME_TYPE_MENU: case META_FRAME_TYPE_MENU:
*title = _("Torn-off Menu"); *title = _("Torn-off Menu");
return menu_contents (); return menu_contents ();
break;
case META_FRAME_TYPE_BORDER: case META_FRAME_TYPE_BORDER:
*title = _("Border"); *title = _("Border");
return border_only_contents (); return border_only_contents ();
break;
case META_FRAME_TYPE_LAST: case META_FRAME_TYPE_LAST:
g_assert_not_reached (); g_assert_not_reached ();
@ -1255,6 +1247,7 @@ run_position_expression_tests (void)
} }
} }
#if 0
static void static void
run_position_expression_timings (void) run_position_expression_timings (void)
{ {
@ -1313,3 +1306,4 @@ run_position_expression_timings (void)
((double)end - (double)start) / CLOCKS_PER_SEC / (double) ITERATIONS); ((double)end - (double)start) / CLOCKS_PER_SEC / (double) ITERATIONS);
} }
#endif

View File

@ -289,7 +289,6 @@ meta_frame_layout_validate (const MetaFrameLayout *layout,
META_THEME_ERROR_FRAME_GEOMETRY, META_THEME_ERROR_FRAME_GEOMETRY,
_("Frame geometry does not specify size of buttons")); _("Frame geometry does not specify size of buttons"));
return FALSE; return FALSE;
break;
} }
CHECK_GEOMETRY_BORDER (button_border); CHECK_GEOMETRY_BORDER (button_border);
@ -1776,7 +1775,6 @@ do_operation (PosExpr *a,
META_THEME_ERROR_MOD_ON_FLOAT, META_THEME_ERROR_MOD_ON_FLOAT,
_("Coordinate expression tries to use mod operator on a floating-point number")); _("Coordinate expression tries to use mod operator on a floating-point number"));
return FALSE; return FALSE;
break;
case POS_OP_ADD: case POS_OP_ADD:
a->d.double_val = a->d.double_val + b->d.double_val; a->d.double_val = a->d.double_val + b->d.double_val;
break; break;
@ -2008,7 +2006,6 @@ pos_eval_helper (PosToken *tokens,
META_THEME_ERROR_BAD_PARENS, META_THEME_ERROR_BAD_PARENS,
_("Coordinate expression had a close parenthesis with no open parenthesis")); _("Coordinate expression had a close parenthesis with no open parenthesis"));
return FALSE; return FALSE;
break;
case POS_TOKEN_VARIABLE: case POS_TOKEN_VARIABLE:
exprs[n_exprs].type = POS_EXPR_INT; exprs[n_exprs].type = POS_EXPR_INT;

View File

@ -26,7 +26,7 @@
static GtkWidget* do_appwindow (void); static GtkWidget* do_appwindow (void);
gboolean aspect_on; static gboolean aspect_on;
static void static void
set_gdk_window_struts (GdkWindow *window, set_gdk_window_struts (GdkWindow *window,

View File

@ -166,7 +166,7 @@ reload_net_wm_pid (MetaWindow *window,
gulong cardinal = (int) value->v.cardinal; gulong cardinal = (int) value->v.cardinal;
if (cardinal <= 0) if (cardinal <= 0)
meta_warning (_("Application set a bogus _NET_WM_PID %ld\n"), meta_warning (_("Application set a bogus _NET_WM_PID %lu\n"),
cardinal); cardinal);
else else
{ {

View File

@ -88,7 +88,7 @@ static void ensure_mru_position_after (MetaWindow *window,
MetaWindow *after_this_one); MetaWindow *after_this_one);
void meta_window_move_resize_now (MetaWindow *window); static void meta_window_move_resize_now (MetaWindow *window);
static void update_move (MetaWindow *window, static void update_move (MetaWindow *window,
gboolean snap, gboolean snap,
@ -105,15 +105,13 @@ static gboolean update_resize_timeout (gpointer data);
/* FIXME we need an abstraction that covers all these queues. */ /* FIXME we need an abstraction that covers all these queues. */
void meta_window_unqueue_calc_showing (MetaWindow *window); static void meta_window_unqueue_calc_showing (MetaWindow *window);
void meta_window_flush_calc_showing (MetaWindow *window); static void meta_window_flush_calc_showing (MetaWindow *window);
void meta_window_unqueue_move_resize (MetaWindow *window); static void meta_window_unqueue_move_resize (MetaWindow *window);
void meta_window_flush_move_resize (MetaWindow *window);
static void meta_window_update_icon_now (MetaWindow *window); static void meta_window_update_icon_now (MetaWindow *window);
void meta_window_unqueue_update_icon (MetaWindow *window); static void meta_window_unqueue_update_icon (MetaWindow *window);
void meta_window_flush_update_icon (MetaWindow *window);
static gboolean queue_calc_showing_func (MetaWindow *window, static gboolean queue_calc_showing_func (MetaWindow *window,
void *data); void *data);
@ -326,7 +324,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
has_shape = bounding_shaped != FALSE; has_shape = bounding_shaped != FALSE;
meta_topic (META_DEBUG_SHAPES, meta_topic (META_DEBUG_SHAPES,
"Window has_shape = %d extents %d,%d %d x %d\n", "Window has_shape = %d extents %d,%d %u x %u\n",
has_shape, x_bounding, y_bounding, has_shape, x_bounding, y_bounding,
w_bounding, h_bounding); w_bounding, h_bounding);
} }
@ -1569,7 +1567,7 @@ idle_calc_showing (gpointer data)
return FALSE; return FALSE;
} }
void static void
meta_window_unqueue_calc_showing (MetaWindow *window) meta_window_unqueue_calc_showing (MetaWindow *window)
{ {
if (!window->calc_showing_queued) if (!window->calc_showing_queued)
@ -1593,7 +1591,7 @@ meta_window_unqueue_calc_showing (MetaWindow *window)
} }
} }
void static void
meta_window_flush_calc_showing (MetaWindow *window) meta_window_flush_calc_showing (MetaWindow *window)
{ {
if (window->calc_showing_queued) if (window->calc_showing_queued)
@ -1829,7 +1827,6 @@ windows_overlap (const MetaWindow *w1, const MetaWindow *w2)
void void
meta_window_show (MetaWindow *window) meta_window_show (MetaWindow *window)
{ {
gboolean did_placement;
gboolean did_show; gboolean did_show;
gboolean takes_focus_on_map; gboolean takes_focus_on_map;
gboolean place_on_top_on_map; gboolean place_on_top_on_map;
@ -1842,7 +1839,6 @@ meta_window_show (MetaWindow *window)
focus_window = window->display->focus_window; /* May be NULL! */ focus_window = window->display->focus_window; /* May be NULL! */
did_show = FALSE; did_show = FALSE;
did_placement = FALSE;
window_state_on_map (window, &takes_focus_on_map, &place_on_top_on_map); window_state_on_map (window, &takes_focus_on_map, &place_on_top_on_map);
needs_stacking_adjustment = FALSE; needs_stacking_adjustment = FALSE;
@ -1898,7 +1894,6 @@ meta_window_show (MetaWindow *window)
* still get placed when they are ultimately shown. * still get placed when they are ultimately shown.
*/ */
window->placed = TRUE; window->placed = TRUE;
did_placement = TRUE;
/* Don't want to accidentally reuse the fact that we had been denied /* Don't want to accidentally reuse the fact that we had been denied
* focus in any future constraints unless we're denied focus again. * focus in any future constraints unless we're denied focus again.
@ -3221,7 +3216,7 @@ meta_window_resize_with_gravity (MetaWindow *window,
x, y, w, h); x, y, w, h);
} }
void static void
meta_window_move_resize_now (MetaWindow *window) meta_window_move_resize_now (MetaWindow *window)
{ {
int x, y; int x, y;
@ -3284,7 +3279,7 @@ idle_move_resize (gpointer data)
return FALSE; return FALSE;
} }
void static void
meta_window_unqueue_move_resize (MetaWindow *window) meta_window_unqueue_move_resize (MetaWindow *window)
{ {
if (!window->move_resize_queued) if (!window->move_resize_queued)
@ -3308,16 +3303,6 @@ meta_window_unqueue_move_resize (MetaWindow *window)
} }
} }
void
meta_window_flush_move_resize (MetaWindow *window)
{
if (window->move_resize_queued)
{
meta_window_unqueue_move_resize (window);
meta_window_move_resize_now (window);
}
}
/* The move/resize queue is only used when we need to /* The move/resize queue is only used when we need to
* recheck the constraints on the window, e.g. when * recheck the constraints on the window, e.g. when
* maximizing or when changing struts. Configure requests * maximizing or when changing struts. Configure requests
@ -3937,7 +3922,7 @@ update_net_frame_extents (MetaWindow *window)
meta_topic (META_DEBUG_GEOMETRY, meta_topic (META_DEBUG_GEOMETRY,
"Setting _NET_FRAME_EXTENTS on managed window 0x%lx " "Setting _NET_FRAME_EXTENTS on managed window 0x%lx "
"to left = %ld, right = %ld, top = %ld, bottom = %ld\n", "to left = %lu, right = %lu, top = %lu, bottom = %lu\n",
window->xwindow, data[0], data[1], data[2], data[3]); window->xwindow, data[0], data[1], data[2], data[3]);
meta_error_trap_push (window->display); meta_error_trap_push (window->display);
@ -3964,7 +3949,7 @@ meta_window_set_current_workspace_hint (MetaWindow *window)
data[0] = meta_window_get_net_wm_desktop (window); data[0] = meta_window_get_net_wm_desktop (window);
meta_verbose ("Setting _NET_WM_DESKTOP of %s to %ld\n", meta_verbose ("Setting _NET_WM_DESKTOP of %s to %lu\n",
window->desc, data[0]); window->desc, data[0]);
meta_error_trap_push (window->display); meta_error_trap_push (window->display);
@ -4174,7 +4159,7 @@ meta_window_configure_request (MetaWindow *window,
else else
{ {
meta_topic (META_DEBUG_GEOMETRY, meta_topic (META_DEBUG_GEOMETRY,
"Not allowing position change for window %s PPosition 0x%lx USPosition 0x%lx type %d\n", "Not allowing position change for window %s PPosition 0x%lx USPosition 0x%lx type %u\n",
window->desc, window->size_hints.flags & PPosition, window->desc, window->size_hints.flags & PPosition,
window->size_hints.flags & USPosition, window->size_hints.flags & USPosition,
window->type); window->type);
@ -4407,7 +4392,7 @@ meta_window_client_message (MetaWindow *window,
if (meta_error_trap_pop_with_return (display, TRUE) != Success) if (meta_error_trap_pop_with_return (display, TRUE) != Success)
str2 = NULL; str2 = NULL;
meta_verbose ("Request to change _NET_WM_STATE action %ld atom1: %s atom2: %s\n", meta_verbose ("Request to change _NET_WM_STATE action %lu atom1: %s atom2: %s\n",
action, action,
str1 ? str1 : "(unknown)", str1 ? str1 : "(unknown)",
str2 ? str2 : "(unknown)"); str2 ? str2 : "(unknown)");
@ -5626,7 +5611,7 @@ idle_update_icon (gpointer data)
return FALSE; return FALSE;
} }
void static void
meta_window_unqueue_update_icon (MetaWindow *window) meta_window_unqueue_update_icon (MetaWindow *window)
{ {
if (!window->update_icon_queued) if (!window->update_icon_queued)
@ -5650,16 +5635,6 @@ meta_window_unqueue_update_icon (MetaWindow *window)
} }
} }
void
meta_window_flush_update_icon (MetaWindow *window)
{
if (window->update_icon_queued)
{
meta_window_unqueue_update_icon (window);
meta_window_update_icon_now (window);
}
}
void void
meta_window_queue_update_icon (MetaWindow *window) meta_window_queue_update_icon (MetaWindow *window)
{ {
@ -5911,7 +5886,7 @@ recalc_window_type (MetaWindow *window)
window->wm_state_modal) window->wm_state_modal)
window->type = META_WINDOW_MODAL_DIALOG; window->type = META_WINDOW_MODAL_DIALOG;
meta_verbose ("Calculated type %d for %s, old type %d\n", meta_verbose ("Calculated type %u for %s, old type %u\n",
window->type, window->desc, old_type); window->type, window->desc, old_type);
if (old_type != window->type) if (old_type != window->type)
@ -6221,7 +6196,7 @@ menu_callback (MetaWindowMenu *menu,
if (window != NULL) /* window can be NULL */ if (window != NULL) /* window can be NULL */
{ {
meta_verbose ("Menu op %d on %s\n", op, window->desc); meta_verbose ("Menu op %u on %s\n", op, window->desc);
/* op can be 0 for none */ /* op can be 0 for none */
switch (op) switch (op)

View File

@ -3,7 +3,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
int gravities[10] = { static int gravities[10] = {
NorthWestGravity, NorthWestGravity,
NorthGravity, NorthGravity,
NorthEastGravity, NorthEastGravity,
@ -21,19 +21,19 @@ typedef struct
int x, y, width, height; int x, y, width, height;
} Rectangle; } Rectangle;
Window windows[10]; static Window windows[10];
int doubled[10] = { 0, }; static int doubled[10] = { 0, };
Rectangle window_rects[10]; static Rectangle window_rects[10];
#define WINDOW_WIDTH 100 #define WINDOW_WIDTH 100
#define WINDOW_HEIGHT 100 #define WINDOW_HEIGHT 100
int x_offset[3] = { 0, - WINDOW_WIDTH/2, -WINDOW_WIDTH }; static int x_offset[3] = { 0, - WINDOW_WIDTH/2, -WINDOW_WIDTH };
int y_offset[3] = { 0, - WINDOW_HEIGHT/2, -WINDOW_HEIGHT }; static int y_offset[3] = { 0, - WINDOW_HEIGHT/2, -WINDOW_HEIGHT };
double screen_x_fraction[3] = { 0, 0.5, 1.0 }; static double screen_x_fraction[3] = { 0, 0.5, 1.0 };
double screen_y_fraction[3] = { 0, 0.5, 1.0 }; static double screen_y_fraction[3] = { 0, 0.5, 1.0 };
int screen_width; static int screen_width;
int screen_height; static int screen_height;
static const char* static const char*
window_gravity_to_string (int gravity) window_gravity_to_string (int gravity)
@ -42,37 +42,26 @@ window_gravity_to_string (int gravity)
{ {
case NorthWestGravity: case NorthWestGravity:
return "NorthWestGravity"; return "NorthWestGravity";
break;
case NorthGravity: case NorthGravity:
return "NorthGravity"; return "NorthGravity";
break;
case NorthEastGravity: case NorthEastGravity:
return "NorthEastGravity"; return "NorthEastGravity";
break;
case WestGravity: case WestGravity:
return "WestGravity"; return "WestGravity";
break;
case CenterGravity: case CenterGravity:
return "CenterGravity"; return "CenterGravity";
break;
case EastGravity: case EastGravity:
return "EastGravity"; return "EastGravity";
break;
case SouthWestGravity: case SouthWestGravity:
return "SouthWestGravity"; return "SouthWestGravity";
break;
case SouthGravity: case SouthGravity:
return "SouthGravity"; return "SouthGravity";
break;
case SouthEastGravity: case SouthEastGravity:
return "SouthEastGravity"; return "SouthEastGravity";
break;
case StaticGravity: case StaticGravity:
return "StaticGravity"; return "StaticGravity";
break;
default: default:
return "NorthWestGravity"; return "NorthWestGravity";
break;
} }
} }
@ -311,7 +300,9 @@ int main (int argc, char **argv)
} }
} }
} }
return 0; /* This program has an infinite loop above so a return statement would
* just cause compiler warnings.
*/
} }

View File

@ -249,7 +249,9 @@ main (int argc, char **argv)
redraw_pending = FALSE; redraw_pending = FALSE;
} }
} }
return 0; /* This program has an infinite loop above so a return statement would
* just cause compiler warnings.
*/
} }

View File

@ -128,7 +128,9 @@ main (int argc, char **argv)
redraw_pending = FALSE; redraw_pending = FALSE;
} }
} }
return 0; /* This program has an infinite loop above so a return statement would
* just cause compiler warnings.
*/
} }

View File

@ -421,7 +421,7 @@ set_active_space_hint (MetaScreen *screen)
data[0] = meta_workspace_index (screen->active_workspace); data[0] = meta_workspace_index (screen->active_workspace);
meta_verbose ("Setting _NET_CURRENT_DESKTOP to %ld\n", data[0]); meta_verbose ("Setting _NET_CURRENT_DESKTOP to %lu\n", data[0]);
meta_error_trap_push (screen->display); meta_error_trap_push (screen->display);
XChangeProperty (screen->display->xdisplay, screen->xroot, XChangeProperty (screen->display->xdisplay, screen->xroot,