[Xfce4-commits] <xfwm4:master> Drop unused variables.
Nick Schermer
noreply at xfce.org
Fri Apr 22 21:58:01 CEST 2011
Updating branch refs/heads/master
to ca64b60653d8feb698ee377ccb8e7872bc95677f (commit)
from c082e6434c664ec9dcd59f021a78ad3781f0d776 (commit)
commit ca64b60653d8feb698ee377ccb8e7872bc95677f
Author: Nick Schermer <nick at xfce.org>
Date: Fri Apr 22 21:06:23 2011 +0200
Drop unused variables.
src/client.c | 6 ------
src/compositor.c | 5 -----
src/events.c | 6 ------
src/focus.c | 11 -----------
src/frame.c | 2 --
src/moveresize.c | 12 +++---------
src/netwm.c | 2 --
src/placement.c | 9 +--------
src/settings.c | 6 ------
src/startup_notification.c | 2 --
src/tabwin.c | 3 +--
src/ui_style.c | 12 ++----------
src/workspaces.c | 2 --
13 files changed, 7 insertions(+), 71 deletions(-)
diff --git a/src/client.c b/src/client.c
index 41a674a..f17e885 100644
--- a/src/client.c
+++ b/src/client.c
@@ -2959,7 +2959,6 @@ void
clientUpdateFullscreenSize (Client * c)
{
ScreenInfo *screen_info;
- DisplayInfo *display_info;
XWindowChanges wc;
GdkRectangle monitor, rect;
int i;
@@ -2969,7 +2968,6 @@ clientUpdateFullscreenSize (Client * c)
TRACE ("Update fullscreen size for client \"%s\" (0x%lx)", c->name, c->window);
screen_info = c->screen_info;
- display_info = screen_info->display_info;
if (FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
{
@@ -3761,10 +3759,6 @@ clientGetButtonPixmap (Client * c, int button, int state)
int
clientGetButtonState (Client *c, int button, int state)
{
- ScreenInfo *screen_info;
-
- screen_info = c->screen_info;
-
if (state == INACTIVE)
{
return (state);
diff --git a/src/compositor.c b/src/compositor.c
index 470b2d3..c0ce4ea 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1252,7 +1252,6 @@ paint_all (ScreenInfo *screen_info, XserverRegion region)
GList *list;
gint screen_width;
gint screen_height;
- gint screen_number;
CWindow *cw;
TRACE ("entering paint_all");
@@ -1262,7 +1261,6 @@ paint_all (ScreenInfo *screen_info, XserverRegion region)
dpy = display_info->dpy;
screen_width = screen_info->width;
screen_height = screen_info->height;
- screen_number = screen_info->screen;
/* Create root buffer if not done yet */
if (screen_info->rootBuffer == None)
@@ -2586,8 +2584,6 @@ void
compositorAddWindow (DisplayInfo *display_info, Window id, Client *c)
{
#ifdef HAVE_COMPOSITOR
- CWindow *cw;
-
g_return_if_fail (display_info != NULL);
g_return_if_fail (id != None);
TRACE ("entering compositorAddWindow for 0x%lx", id);
@@ -2597,7 +2593,6 @@ compositorAddWindow (DisplayInfo *display_info, Window id, Client *c)
return;
}
- cw = find_cwindow_in_display (display_info, id);
if (!compositorSetClient (display_info, id, c))
{
add_win (display_info, id, c);
diff --git a/src/events.c b/src/events.c
index f3aadcf..c6f9d82 100644
--- a/src/events.c
+++ b/src/events.c
@@ -295,7 +295,6 @@ handleKeyPress (DisplayInfo *display_info, XKeyEvent * ev)
eventFilterStatus status;
ScreenInfo *screen_info;
ScreenInfo *ev_screen_info;
- gboolean handled;
Client *c;
int key;
@@ -309,7 +308,6 @@ handleKeyPress (DisplayInfo *display_info, XKeyEvent * ev)
return EVENT_FILTER_PASS;
}
- handled = FALSE;
status = EVENT_FILTER_PASS;
c = clientGetFocus ();
if (c)
@@ -671,7 +669,6 @@ static void
button1Action (Client * c, XButtonEvent * ev)
{
ScreenInfo *screen_info;
- DisplayInfo *display_info;
XEvent copy_event;
XfwmButtonClickType tclick;
@@ -679,7 +676,6 @@ button1Action (Client * c, XButtonEvent * ev)
g_return_if_fail (ev != NULL);
screen_info = c->screen_info;
- display_info = screen_info->display_info;
if (!(c->type & WINDOW_TYPE_DONT_FOCUS))
{
@@ -724,14 +720,12 @@ static void
titleButton (Client * c, guint state, XButtonEvent * ev)
{
ScreenInfo *screen_info;
- DisplayInfo *display_info;
g_return_if_fail (c != NULL);
g_return_if_fail (ev != NULL);
/* Get Screen data from the client itself */
screen_info = c->screen_info;
- display_info = screen_info->display_info;
if (ev->button == Button1)
{
diff --git a/src/focus.c b/src/focus.c
index 7c6ccf5..bc6e810 100644
--- a/src/focus.c
+++ b/src/focus.c
@@ -122,9 +122,7 @@ void
clientFocusTop (ScreenInfo *screen_info, guint layer, guint32 timestamp)
{
ClientPair top_client;
- DisplayInfo *display_info;
- display_info = screen_info->display_info;
top_client = clientGetTopMostFocusable (screen_info, layer, NULL);
if (top_client.prefered)
{
@@ -340,7 +338,6 @@ clientPassFocus (ScreenInfo *screen_info, Client *c, GList *exclude_list)
ClientPair top_most;
Client *new_focus;
Client *current_focus;
- Client *c2;
Window dr, window;
unsigned int mask;
int rx, ry, wx, wy;
@@ -351,7 +348,6 @@ clientPassFocus (ScreenInfo *screen_info, Client *c, GList *exclude_list)
look_in_layer = (c ? c->win_layer : WIN_LAYER_NORMAL);
new_focus = NULL;
current_focus = client_focus;
- c2 = NULL;
if (pending_focus)
{
@@ -484,13 +480,11 @@ clientFocusNone (ScreenInfo *screen_info, Client *previous, guint32 timestamp)
void
clientUpdateFocus (ScreenInfo *screen_info, Client * c, unsigned short flags)
{
- DisplayInfo *display_info;
Client *c2;
TRACE ("entering clientUpdateFocus");
c2 = ((client_focus != c) ? client_focus : NULL);
- display_info = screen_info->display_info;
pending_focus = NULL;
if ((c) && !clientAcceptFocus (c))
{
@@ -548,12 +542,10 @@ clientUpdateFocus (ScreenInfo *screen_info, Client * c, unsigned short flags)
void
clientSetFocus (ScreenInfo *screen_info, Client *c, guint32 timestamp, unsigned short flags)
{
- DisplayInfo *display_info;
Client *c2;
TRACE ("entering clientSetFocus");
- display_info = screen_info->display_info;
c2 = NULL;
if ((c) && !(flags & FOCUS_IGNORE_MODAL))
{
@@ -726,13 +718,10 @@ clientGrabMouseButton (Client * c)
void
clientUngrabMouseButton (Client * c)
{
- ScreenInfo *screen_info;
-
g_return_if_fail (c != NULL);
TRACE ("entering clientUngrabMouseButton");
TRACE ("ungrabing buttons for client \"%s\" (0x%lx)", c->name, c->window);
- screen_info = c->screen_info;
ungrabButton(clientGetXDisplay (c), AnyButton, AnyModifier, c->window);
/* We've ungrabbed way too much, so regrab the regular buttons/modifiers */
clientGrabButtons (c);
diff --git a/src/frame.c b/src/frame.c
index 68e1eed..0ac29cd 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -281,7 +281,6 @@ static void
frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap * title_pm, xfwmPixmap * top_pm)
{
ScreenInfo *screen_info;
- DisplayInfo *display_info;
GdkPixmap *gpixmap;
GdkGCValues values;
GdkGC *gc;
@@ -298,7 +297,6 @@ frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap *
g_return_if_fail (top_pm);
screen_info = c->screen_info;
- display_info = screen_info->display_info;
if (left > right)
{
diff --git a/src/moveresize.c b/src/moveresize.c
index 0ee9ebf..8b58544 100644
--- a/src/moveresize.c
+++ b/src/moveresize.c
@@ -482,7 +482,7 @@ clientSnapPosition (Client * c, int prev_x, int prev_y)
int cx, cy, delta;
int disp_x, disp_y, disp_max_x, disp_max_y;
int frame_x, frame_y, frame_height, frame_width;
- int frame_top, frame_left, frame_right, frame_bottom;
+ int frame_top, frame_left;
int frame_x2, frame_y2;
int best_frame_x, best_frame_y;
int best_delta_x, best_delta_y;
@@ -503,8 +503,6 @@ clientSnapPosition (Client * c, int prev_x, int prev_y)
frame_width = frameWidth (c);
frame_top = frameTop (c);
frame_left = frameLeft (c);
- frame_right = frameRight (c);
- frame_bottom = frameBottom (c);
cx = frame_x + (frame_width / 2);
cy = frame_y + (frame_height / 2);
@@ -895,10 +893,9 @@ clientMoveEventFilter (XEvent * xevent, gpointer data)
if (xevent->xmotion.y_root - passdata->my > 15)
{
/* to keep the distance from the edges of the window proportional. */
- double xratio, yratio;
+ double xratio;
xratio = (xevent->xmotion.x_root - c->x)/(double)c->width;
- yratio = (xevent->xmotion.y_root - c->y)/(double)c->width;
clientToggleMaximized (c, WIN_STATE_MAXIMIZED, FALSE);
passdata->move_resized = TRUE;
@@ -1214,7 +1211,7 @@ clientResizeEventFilter (XEvent * xevent, gpointer data)
int prev_x, prev_y, prev_width, prev_height;
int cx, cy, disp_x, disp_y, disp_max_x, disp_max_y;
int frame_x, frame_y, frame_height, frame_width;
- int frame_top, frame_left, frame_right, frame_bottom;
+ int frame_top;
int move_top, move_bottom, move_left, move_right;
int temp;
gint min_visible;
@@ -1236,9 +1233,6 @@ clientResizeEventFilter (XEvent * xevent, gpointer data)
frame_height = frameHeight (c);
frame_width = frameWidth (c);
frame_top = frameTop (c);
- frame_left = frameLeft (c);
- frame_right = frameRight (c);
- frame_bottom = frameBottom (c);
min_visible = MAX (frame_top, CLIENT_MIN_VISIBLE);
cx = frame_x + (frame_width / 2);
diff --git a/src/netwm.c b/src/netwm.c
index 7ff5c2e..fcd6123 100644
--- a/src/netwm.c
+++ b/src/netwm.c
@@ -954,12 +954,10 @@ clientValidateNetStrut (Client * c)
{
ScreenInfo *screen_info;
gboolean valid;
- int max_value;
g_return_val_if_fail (c != NULL, TRUE);
TRACE ("entering clientValidateNetStrut for \"%s\" (0x%lx)", c->name, c->window);
screen_info = c->screen_info;
- max_value = MIN (screen_info->width, screen_info->height) / 4;
valid = TRUE;
if (c->struts[STRUTS_TOP] > screen_info->height - screen_info->margins[STRUTS_BOTTOM])
diff --git a/src/placement.c b/src/placement.c
index 1624277..0881f7d 100644
--- a/src/placement.c
+++ b/src/placement.c
@@ -454,7 +454,6 @@ clientKeepVisible (Client * c, gint n_monitors, GdkRectangle *monitor_rect)
ScreenInfo *screen_info;
GdkRectangle rect;
gboolean centered;
- int cx, cy;
int diff_x, diff_y;
int monitor_nbr;
@@ -462,8 +461,6 @@ clientKeepVisible (Client * c, gint n_monitors, GdkRectangle *monitor_rect)
TRACE ("entering clientKeepVisible");
TRACE ("client \"%s\" (0x%lx)", c->name, c->window);
- cx = frameX (c) + (frameWidth (c) / 2);
- cy = frameY (c) + (frameHeight (c) / 2);
screen_info = c->screen_info;
centered = FALSE;
@@ -543,15 +540,13 @@ smartPlacement (Client * c, int full_x, int full_y, int full_w, int full_h)
gfloat best_overlaps;
guint i;
gint test_x, test_y, xmax, ymax, best_x, best_y;
- gint frame_x, frame_y, frame_height, frame_width, frame_left, frame_top;
+ gint frame_height, frame_width, frame_left, frame_top;
gboolean first;
g_return_if_fail (c != NULL);
TRACE ("entering smartPlacement");
screen_info = c->screen_info;
- frame_x = frameX (c);
- frame_y = frameY (c);
frame_height = frameHeight (c);
frame_width = frameWidth (c);
frame_left = frameLeft(c);
@@ -751,7 +746,6 @@ void
clientFill (Client * c, int fill_type)
{
ScreenInfo *screen_info;
- DisplayInfo *display_info;
Client *east_neighbour;
Client *west_neighbour;
Client *north_neighbour;
@@ -773,7 +767,6 @@ clientFill (Client * c, int fill_type)
}
screen_info = c->screen_info;
- display_info = screen_info->display_info;
mask = 0;
east_neighbour = NULL;
west_neighbour = NULL;
diff --git a/src/settings.c b/src/settings.c
index d4b5aff..20efbc6 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -400,14 +400,12 @@ loadTheme (ScreenInfo *screen_info, Settings *rc)
gchar *theme;
const gchar *font;
PangoFontDescription *desc;
- PangoContext *context;
guint i, j;
widget = myScreenGetGtkWidget (screen_info);
display_info = screen_info->display_info;
desc = NULL;
- context = NULL;
i = 0;
while (ui_part[i] && ui_state[i])
@@ -463,7 +461,6 @@ loadTheme (ScreenInfo *screen_info, Settings *rc)
if (font && strlen (font))
{
desc = pango_font_description_from_string (font);
- context = getUIPangoContext (widget);
if (desc)
{
gtk_widget_modify_font (widget, desc);
@@ -569,11 +566,8 @@ loadKeyBindings (ScreenInfo *screen_info)
{
GList *shortcuts;
gchar keyname[30];
- Display *dpy;
guint i;
- dpy = myScreenGetXDisplay (screen_info);
-
shortcuts = xfce_shortcuts_provider_get_shortcuts (screen_info->shortcuts_provider);
parseShortcut (screen_info, KEY_CANCEL, "cancel_key", shortcuts);
diff --git a/src/startup_notification.c b/src/startup_notification.c
index a1405aa..ac3042c 100644
--- a/src/startup_notification.c
+++ b/src/startup_notification.c
@@ -187,7 +187,6 @@ sn_startup_sequence_timeout (void *data)
static void
sn_screen_event (SnMonitorEvent * event, void *user_data)
{
- const char *wmclass;
ScreenInfo *screen_info;
SnStartupSequence *sequence;
@@ -200,7 +199,6 @@ sn_screen_event (SnMonitorEvent * event, void *user_data)
switch (sn_monitor_event_get_type (event))
{
case SN_MONITOR_EVENT_INITIATED:
- wmclass = sn_startup_sequence_get_wmclass (sequence);
sn_add_sequence (screen_info, sequence);
break;
diff --git a/src/tabwin.c b/src/tabwin.c
index c58a893..097ae19 100644
--- a/src/tabwin.c
+++ b/src/tabwin.c
@@ -217,12 +217,11 @@ createWindowlist (ScreenInfo *screen_info, TabwinWidget *tbw)
GList *client_list;
GdkRectangle monitor;
GtkWidget *windowlist, *icon, *selected;
- int i, packpos;
+ int packpos;
Tabwin *t;
TRACE ("entering createWindowlist");
- i = 0;
packpos = 0;
c = NULL;
selected = NULL;
diff --git a/src/ui_style.c b/src/ui_style.c
index 1443ea3..6c61756 100644
--- a/src/ui_style.c
+++ b/src/ui_style.c
@@ -59,11 +59,7 @@ char *names[] = {
static gint
state_value (const gchar * s)
{
- gchar *t;
- gint u;
-
- t = states[0];
- u = 0;
+ gint u = 0;
while ((states[u]) && (strcmp (states[u], s)))
{
@@ -79,11 +75,7 @@ state_value (const gchar * s)
static gint
name_value (const gchar * s)
{
- gchar *t;
- gint u;
-
- t = names[0];
- u = 0;
+ gint u = 0;
while ((names[u]) && (strcmp (names[u], s)))
{
diff --git a/src/workspaces.c b/src/workspaces.c
index 0f8d8ac..c4c4c6a 100644
--- a/src/workspaces.c
+++ b/src/workspaces.c
@@ -243,7 +243,6 @@ workspaceSwitch (ScreenInfo *screen_info, gint new_ws, Client * c2, gboolean upd
Client *c, *new_focus;
Client *previous;
GList *list;
- GList *list_hide;
Window dr, window;
gint rx, ry, wx, wy;
unsigned int mask;
@@ -284,7 +283,6 @@ workspaceSwitch (ScreenInfo *screen_info, gint new_ws, Client * c2, gboolean upd
screen_info->current_ws = new_ws;
new_focus = NULL;
- list_hide = NULL;
previous = NULL;
c = clientGetFocus ();
More information about the Xfce4-commits
mailing list