summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/frames.c6
-rw-r--r--src/ui/preview-widget.c2
-rw-r--r--src/ui/theme.c8
3 files changed, 5 insertions, 11 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c
index d1a62656..87d075e9 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -1478,7 +1478,7 @@ meta_frames_button_press_event (GtkWidget *widget,
(control == META_FRAME_CONTROL_MAXIMIZE ||
control == META_FRAME_CONTROL_UNMAXIMIZE))
{
- MetaGrabOp op = META_GRAB_OP_NONE;
+ MetaGrabOp op;
switch (control)
{
@@ -1490,8 +1490,6 @@ meta_frames_button_press_event (GtkWidget *widget,
op = op > META_GRAB_OP_CLICKING_MAXIMIZE_HORIZONTAL ? META_GRAB_OP_CLICKING_MAXIMIZE : op;
break;
case META_FRAME_CONTROL_UNMAXIMIZE:
- op = META_GRAB_OP_CLICKING_UNMAXIMIZE + event->button - 1;
- op = op > META_GRAB_OP_CLICKING_UNMAXIMIZE_HORIZONTAL ? META_GRAB_OP_CLICKING_UNMAXIMIZE : op;
op = META_GRAB_OP_CLICKING_UNMAXIMIZE;
break;
case META_FRAME_CONTROL_DELETE:
@@ -1523,7 +1521,7 @@ meta_frames_button_press_event (GtkWidget *widget,
break;
default:
g_assert_not_reached ();
- break;
+ op = META_GRAB_OP_NONE;
}
meta_core_begin_grab_op (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
diff --git a/src/ui/preview-widget.c b/src/ui/preview-widget.c
index 6dc4691c..c1c3ad0b 100644
--- a/src/ui/preview-widget.c
+++ b/src/ui/preview-widget.c
@@ -233,8 +233,6 @@ meta_preview_draw (GtkWidget *widget,
if (preview->theme)
{
- border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
-
meta_theme_draw_frame (preview->theme,
widget,
cr,
diff --git a/src/ui/theme.c b/src/ui/theme.c
index b97b0118..33a502b8 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -667,10 +667,6 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
fgeom->left_titlebar_edge = layout->left_titlebar_edge;
fgeom->right_titlebar_edge = layout->right_titlebar_edge;
- /* gcc warnings */
- button_width = -1;
- button_height = -1;
-
switch (layout->button_sizing)
{
case META_BUTTON_SIZING_ASPECT:
@@ -683,7 +679,9 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
break;
case META_BUTTON_SIZING_LAST:
g_assert_not_reached ();
- break;
+ default:
+ button_width = -1;
+ button_height = -1;
}
/* FIXME all this code sort of pretends that duplicate buttons