Remove trailing whitespace
This commit is contained in:
172
src/ui/frames.c
172
src/ui/frames.c
@@ -2,11 +2,11 @@
|
||||
|
||||
/* Metacity window frame manager widget */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2003 Red Hat, Inc.
|
||||
* Copyright (C) 2005, 2006 Elijah Newren
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
@@ -16,7 +16,7 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -129,7 +129,7 @@ meta_frames_class_init (MetaFramesClass *class)
|
||||
widget_class->style_updated = meta_frames_style_updated;
|
||||
|
||||
widget_class->draw = meta_frames_draw;
|
||||
widget_class->destroy_event = meta_frames_destroy_event;
|
||||
widget_class->destroy_event = meta_frames_destroy_event;
|
||||
widget_class->button_press_event = meta_frames_button_press_event;
|
||||
widget_class->button_release_event = meta_frames_button_release_event;
|
||||
widget_class->motion_notify_event = meta_frames_motion_notify_event;
|
||||
@@ -217,7 +217,7 @@ static void
|
||||
meta_frames_init (MetaFrames *frames)
|
||||
{
|
||||
frames->text_heights = g_hash_table_new (NULL, NULL);
|
||||
|
||||
|
||||
frames->frames = g_hash_table_new (unsigned_long_hash, unsigned_long_equal);
|
||||
|
||||
frames->style_variants = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
@@ -245,7 +245,7 @@ meta_frames_destroy (GtkWidget *object)
|
||||
GSList *winlist;
|
||||
GSList *tmp;
|
||||
MetaFrames *frames;
|
||||
|
||||
|
||||
frames = META_FRAMES (object);
|
||||
|
||||
winlist = NULL;
|
||||
@@ -281,13 +281,13 @@ static void
|
||||
meta_frames_finalize (GObject *object)
|
||||
{
|
||||
MetaFrames *frames;
|
||||
|
||||
|
||||
frames = META_FRAMES (object);
|
||||
|
||||
meta_prefs_remove_listener (prefs_changed_callback, frames);
|
||||
|
||||
|
||||
g_hash_table_destroy (frames->text_heights);
|
||||
|
||||
|
||||
g_assert (g_hash_table_size (frames->frames) == 0);
|
||||
g_hash_table_destroy (frames->frames);
|
||||
|
||||
@@ -308,7 +308,7 @@ queue_recalc_func (gpointer key, gpointer value, gpointer data)
|
||||
* in case of color change.
|
||||
*/
|
||||
meta_frames_set_window_background (frames, frame);
|
||||
|
||||
|
||||
invalidate_whole_window (frames, frame);
|
||||
meta_core_queue_frame_resize (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
frame->xwindow);
|
||||
@@ -316,7 +316,7 @@ queue_recalc_func (gpointer key, gpointer value, gpointer data)
|
||||
{
|
||||
/* save title to recreate layout */
|
||||
g_free (frame->title);
|
||||
|
||||
|
||||
frame->title = g_strdup (pango_layout_get_text (frame->layout));
|
||||
|
||||
g_object_unref (G_OBJECT (frame->layout));
|
||||
@@ -332,7 +332,7 @@ meta_frames_font_changed (MetaFrames *frames)
|
||||
g_hash_table_destroy (frames->text_heights);
|
||||
frames->text_heights = g_hash_table_new (NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
/* Queue a draw/resize on all frames */
|
||||
g_hash_table_foreach (frames->frames,
|
||||
queue_recalc_func, frames);
|
||||
@@ -405,7 +405,7 @@ meta_frames_ensure_layout (MetaFrames *frames,
|
||||
widget = GTK_WIDGET (frames);
|
||||
|
||||
g_return_if_fail (gtk_widget_get_realized (widget));
|
||||
|
||||
|
||||
meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
META_CORE_GET_FRAME_TYPE, &type,
|
||||
@@ -420,7 +420,7 @@ meta_frames_ensure_layout (MetaFrames *frames,
|
||||
{
|
||||
/* save title to recreate layout */
|
||||
g_free (frame->title);
|
||||
|
||||
|
||||
frame->title = g_strdup (pango_layout_get_text (frame->layout));
|
||||
|
||||
g_object_unref (G_OBJECT (frame->layout));
|
||||
@@ -429,18 +429,18 @@ meta_frames_ensure_layout (MetaFrames *frames,
|
||||
}
|
||||
|
||||
frame->cache_style = style;
|
||||
|
||||
|
||||
if (frame->layout == NULL)
|
||||
{
|
||||
gpointer key, value;
|
||||
PangoFontDescription *font_desc;
|
||||
double scale;
|
||||
int size;
|
||||
|
||||
|
||||
scale = meta_theme_get_title_scale (meta_theme_get_current (),
|
||||
type,
|
||||
flags);
|
||||
|
||||
|
||||
frame->layout = gtk_widget_create_pango_layout (widget, frame->title);
|
||||
|
||||
pango_layout_set_ellipsize (frame->layout, PANGO_ELLIPSIZE_END);
|
||||
@@ -468,10 +468,10 @@ meta_frames_ensure_layout (MetaFrames *frames,
|
||||
GINT_TO_POINTER (size),
|
||||
GINT_TO_POINTER (frame->text_height));
|
||||
}
|
||||
|
||||
pango_layout_set_font_description (frame->layout,
|
||||
|
||||
pango_layout_set_font_description (frame->layout,
|
||||
font_desc);
|
||||
|
||||
|
||||
pango_font_description_free (font_desc);
|
||||
|
||||
/* Save some RAM */
|
||||
@@ -489,7 +489,7 @@ meta_frames_calc_geometry (MetaFrames *frames,
|
||||
MetaFrameFlags flags;
|
||||
MetaFrameType type;
|
||||
MetaButtonLayout button_layout;
|
||||
|
||||
|
||||
meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow,
|
||||
META_CORE_GET_CLIENT_WIDTH, &width,
|
||||
META_CORE_GET_CLIENT_HEIGHT, &height,
|
||||
@@ -500,7 +500,7 @@ meta_frames_calc_geometry (MetaFrames *frames,
|
||||
meta_frames_ensure_layout (frames, frame);
|
||||
|
||||
meta_prefs_get_button_layout (&button_layout);
|
||||
|
||||
|
||||
meta_theme_calc_geometry (meta_theme_get_current (),
|
||||
type,
|
||||
frame->text_height,
|
||||
@@ -575,7 +575,7 @@ meta_frames_manage_window (MetaFrames *frames,
|
||||
g_assert (window);
|
||||
|
||||
frame = g_new (MetaUIFrame, 1);
|
||||
|
||||
|
||||
frame->window = window;
|
||||
|
||||
gdk_window_set_user_data (frame->window, frames);
|
||||
@@ -583,7 +583,7 @@ meta_frames_manage_window (MetaFrames *frames,
|
||||
frame->style = NULL;
|
||||
|
||||
/* Don't set event mask here, it's in frame.c */
|
||||
|
||||
|
||||
frame->xwindow = xwindow;
|
||||
frame->cache_style = NULL;
|
||||
frame->layout = NULL;
|
||||
@@ -596,9 +596,9 @@ meta_frames_manage_window (MetaFrames *frames,
|
||||
* registered with its MetaWindow, which happens after this function
|
||||
* and meta_ui_create_frame_window() return to meta_window_ensure_frame().
|
||||
*/
|
||||
|
||||
|
||||
meta_core_grab_buttons (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow);
|
||||
|
||||
|
||||
g_hash_table_replace (frames->frames, &frame->xwindow, frame);
|
||||
}
|
||||
|
||||
@@ -621,7 +621,7 @@ meta_frames_unmanage_window (MetaFrames *frames,
|
||||
|
||||
if (frames->last_motion_frame == frame)
|
||||
frames->last_motion_frame = NULL;
|
||||
|
||||
|
||||
g_hash_table_remove (frames->frames, &frame->xwindow);
|
||||
|
||||
g_object_unref (frame->style);
|
||||
@@ -633,7 +633,7 @@ meta_frames_unmanage_window (MetaFrames *frames,
|
||||
|
||||
if (frame->title)
|
||||
g_free (frame->title);
|
||||
|
||||
|
||||
g_free (frame);
|
||||
}
|
||||
else
|
||||
@@ -667,7 +667,7 @@ meta_ui_frame_get_borders (MetaFrames *frames,
|
||||
g_return_if_fail (type < META_FRAME_TYPE_LAST);
|
||||
|
||||
meta_frames_ensure_layout (frames, frame);
|
||||
|
||||
|
||||
/* We can't get the full geometry, because that depends on
|
||||
* the client window size and probably we're being called
|
||||
* by the core move/resize code to decide on the client
|
||||
@@ -731,7 +731,7 @@ meta_frames_reset_bg (MetaFrames *frames,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
|
||||
|
||||
frame = meta_frames_lookup_window (frames, xwindow);
|
||||
|
||||
meta_frames_set_window_background (frames, frame);
|
||||
@@ -755,7 +755,7 @@ meta_frames_unflicker_bg (MetaFrames *frames,
|
||||
int target_height)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
|
||||
|
||||
frame = meta_frames_lookup_window (frames, xwindow);
|
||||
g_return_if_fail (frame != NULL);
|
||||
|
||||
@@ -807,7 +807,7 @@ get_visible_region (MetaFrames *frames,
|
||||
|
||||
corners_region = cairo_region_create ();
|
||||
get_visible_frame_rect (fgeom, window_width, window_height, &frame_rect);
|
||||
|
||||
|
||||
if (fgeom->top_left_corner_rounded_radius != 0)
|
||||
{
|
||||
const int corner = fgeom->top_left_corner_rounded_radius;
|
||||
@@ -821,7 +821,7 @@ get_visible_region (MetaFrames *frames,
|
||||
rect.y = frame_rect.y + i;
|
||||
rect.width = width;
|
||||
rect.height = 1;
|
||||
|
||||
|
||||
cairo_region_union_rectangle (corners_region, &rect);
|
||||
}
|
||||
}
|
||||
@@ -839,7 +839,7 @@ get_visible_region (MetaFrames *frames,
|
||||
rect.y = frame_rect.y + i;
|
||||
rect.width = width;
|
||||
rect.height = 1;
|
||||
|
||||
|
||||
cairo_region_union_rectangle (corners_region, &rect);
|
||||
}
|
||||
}
|
||||
@@ -857,7 +857,7 @@ get_visible_region (MetaFrames *frames,
|
||||
rect.y = frame_rect.y + frame_rect.height - i - 1;
|
||||
rect.width = width;
|
||||
rect.height = 1;
|
||||
|
||||
|
||||
cairo_region_union_rectangle (corners_region, &rect);
|
||||
}
|
||||
}
|
||||
@@ -875,11 +875,11 @@ get_visible_region (MetaFrames *frames,
|
||||
rect.y = frame_rect.y + frame_rect.height - i - 1;
|
||||
rect.width = width;
|
||||
rect.height = 1;
|
||||
|
||||
|
||||
cairo_region_union_rectangle (corners_region, &rect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
visible_region = cairo_region_create_rectangle (&frame_rect);
|
||||
cairo_region_subtract (visible_region, corners_region);
|
||||
cairo_region_destroy (corners_region);
|
||||
@@ -916,7 +916,7 @@ meta_frames_move_resize_frame (MetaFrames *frames,
|
||||
{
|
||||
MetaUIFrame *frame = meta_frames_lookup_window (frames, xwindow);
|
||||
int old_width, old_height;
|
||||
|
||||
|
||||
old_width = gdk_window_get_width (frame->window);
|
||||
old_height = gdk_window_get_height (frame->window);
|
||||
|
||||
@@ -931,7 +931,7 @@ meta_frames_queue_draw (MetaFrames *frames,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
|
||||
|
||||
frame = meta_frames_lookup_window (frames, xwindow);
|
||||
|
||||
invalidate_whole_window (frames, frame);
|
||||
@@ -943,14 +943,14 @@ meta_frames_set_title (MetaFrames *frames,
|
||||
const char *title)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
|
||||
|
||||
frame = meta_frames_lookup_window (frames, xwindow);
|
||||
|
||||
g_assert (frame);
|
||||
|
||||
|
||||
g_free (frame->title);
|
||||
frame->title = g_strdup (title);
|
||||
|
||||
|
||||
if (frame->layout)
|
||||
{
|
||||
g_object_unref (frame->layout);
|
||||
@@ -979,7 +979,7 @@ meta_frames_repaint_frame (MetaFrames *frames,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
|
||||
|
||||
frame = meta_frames_lookup_window (frames, xwindow);
|
||||
|
||||
g_assert (frame);
|
||||
@@ -997,7 +997,7 @@ redraw_control (MetaFrames *frames,
|
||||
{
|
||||
MetaFrameGeometry fgeom;
|
||||
GdkRectangle *rect;
|
||||
|
||||
|
||||
meta_frames_calc_geometry (frames, frame, &fgeom);
|
||||
|
||||
rect = control_rect (control, &fgeom);
|
||||
@@ -1014,7 +1014,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
Display *display;
|
||||
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_SHADE:
|
||||
@@ -1022,7 +1022,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
META_CORE_GET_END);
|
||||
|
||||
|
||||
if (flags & META_FRAME_ALLOWS_SHADE)
|
||||
{
|
||||
if (flags & META_FRAME_SHADED)
|
||||
@@ -1035,14 +1035,14 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
event->time);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE:
|
||||
{
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
META_CORE_GET_END);
|
||||
|
||||
|
||||
if (flags & META_FRAME_ALLOWS_MAXIMIZE)
|
||||
{
|
||||
meta_core_toggle_maximize (display, frame->xwindow);
|
||||
@@ -1055,7 +1055,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
META_CORE_GET_END);
|
||||
|
||||
|
||||
if (flags & META_FRAME_ALLOWS_MAXIMIZE)
|
||||
{
|
||||
meta_core_toggle_maximize_horizontally (display, frame->xwindow);
|
||||
@@ -1068,7 +1068,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
META_CORE_GET_END);
|
||||
|
||||
|
||||
if (flags & META_FRAME_ALLOWS_MAXIMIZE)
|
||||
{
|
||||
meta_core_toggle_maximize_vertically (display, frame->xwindow);
|
||||
@@ -1081,7 +1081,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
META_CORE_GET_END);
|
||||
|
||||
|
||||
if (flags & META_FRAME_ALLOWS_MINIMIZE)
|
||||
{
|
||||
meta_core_minimize (display, frame->xwindow);
|
||||
@@ -1092,7 +1092,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
case G_DESKTOP_TITLEBAR_ACTION_NONE:
|
||||
/* Yaay, a sane user that doesn't use that other weird crap! */
|
||||
break;
|
||||
|
||||
|
||||
case G_DESKTOP_TITLEBAR_ACTION_LOWER:
|
||||
meta_core_user_lower_and_unfocus (display,
|
||||
frame->xwindow,
|
||||
@@ -1108,7 +1108,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
event->time);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1117,7 +1117,7 @@ meta_frame_double_click_event (MetaUIFrame *frame,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
int action = meta_prefs_get_action_double_click_titlebar ();
|
||||
|
||||
|
||||
return meta_frame_titlebar_event (frame, event, action);
|
||||
}
|
||||
|
||||
@@ -1126,7 +1126,7 @@ meta_frame_middle_click_event (MetaUIFrame *frame,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
int action = meta_prefs_get_action_middle_click_titlebar();
|
||||
|
||||
|
||||
return meta_frame_titlebar_event (frame, event, action);
|
||||
}
|
||||
|
||||
@@ -1135,7 +1135,7 @@ meta_frame_right_click_event(MetaUIFrame *frame,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
int action = meta_prefs_get_action_right_click_titlebar();
|
||||
|
||||
|
||||
return meta_frame_titlebar_event (frame, event, action);
|
||||
}
|
||||
|
||||
@@ -1147,14 +1147,14 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
MetaFrames *frames;
|
||||
MetaFrameControl control;
|
||||
Display *display;
|
||||
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
|
||||
/* Remember that the display may have already done something with this event.
|
||||
* If so there's probably a GrabOp in effect.
|
||||
*/
|
||||
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
@@ -1172,13 +1172,13 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
frame->xwindow);
|
||||
meta_core_user_focus (display,
|
||||
frame->xwindow,
|
||||
event->time);
|
||||
event->time);
|
||||
}
|
||||
|
||||
/* don't do the rest of this if on client area */
|
||||
if (control == META_FRAME_CONTROL_CLIENT_AREA)
|
||||
return FALSE; /* not on the frame, just passed through from client */
|
||||
|
||||
|
||||
/* We want to shade even if we have a GrabOp, since we'll have a move grab
|
||||
* if we double click the titlebar.
|
||||
*/
|
||||
@@ -1191,7 +1191,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
}
|
||||
|
||||
if (meta_core_get_grab_op (display) != META_GRAB_OP_NONE)
|
||||
return FALSE; /* already up to something */
|
||||
return FALSE; /* already up to something */
|
||||
|
||||
if (event->button == 1 &&
|
||||
(control == META_FRAME_CONTROL_MAXIMIZE ||
|
||||
@@ -1226,7 +1226,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
/* get delta to convert to root coords */
|
||||
dx = event->x_root - event->x;
|
||||
dy = event->y_root - event->y;
|
||||
|
||||
|
||||
/* Align to the right end of the menu rectangle if RTL */
|
||||
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
|
||||
dx += rect->width;
|
||||
@@ -1250,7 +1250,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
control == META_FRAME_CONTROL_RESIZE_W))
|
||||
{
|
||||
MetaGrabOp op;
|
||||
|
||||
|
||||
op = META_GRAB_OP_NONE;
|
||||
|
||||
switch (control)
|
||||
@@ -1305,7 +1305,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
META_CORE_GET_END);
|
||||
|
||||
if (flags & META_FRAME_ALLOWS_MOVE)
|
||||
{
|
||||
{
|
||||
meta_core_begin_grab_op (display,
|
||||
frame->xwindow,
|
||||
META_GRAB_OP_MOVING,
|
||||
@@ -1326,7 +1326,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
{
|
||||
return meta_frame_right_click_event (frame, event);
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1337,7 +1337,7 @@ meta_frames_button_release_event (GtkWidget *widget,
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
Display *display;
|
||||
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
|
||||
@@ -1360,7 +1360,7 @@ meta_frames_button_release_event (GtkWidget *widget,
|
||||
break;
|
||||
case META_FRAME_CONTROL_MAXIMIZE:
|
||||
/* Focus the window on the maximize */
|
||||
meta_core_user_focus (display, frame->xwindow, event->time);
|
||||
meta_core_user_focus (display, frame->xwindow, event->time);
|
||||
meta_core_maximize (display, frame->xwindow);
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
@@ -1399,7 +1399,7 @@ meta_frames_button_release_event (GtkWidget *widget,
|
||||
MetaFrameControl control = get_control (frames, frame, event->x, event->y);
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1413,9 +1413,9 @@ meta_frames_update_prelit_control (MetaFrames *frames,
|
||||
|
||||
meta_verbose ("Updating prelit control from %u to %u\n",
|
||||
frame->prelit_control, control);
|
||||
|
||||
|
||||
cursor = META_CURSOR_DEFAULT;
|
||||
|
||||
|
||||
switch (control)
|
||||
{
|
||||
case META_FRAME_CONTROL_CLIENT_AREA:
|
||||
@@ -1470,12 +1470,12 @@ meta_frames_update_prelit_control (MetaFrames *frames,
|
||||
case META_FRAME_CONTROL_RESIZE_E:
|
||||
cursor = META_CURSOR_EAST_RESIZE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* set/unset the prelight cursor */
|
||||
meta_core_set_screen_cursor (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
frame->xwindow,
|
||||
cursor);
|
||||
cursor);
|
||||
|
||||
switch (control)
|
||||
{
|
||||
@@ -1496,7 +1496,7 @@ meta_frames_update_prelit_control (MetaFrames *frames,
|
||||
/* Only prelight buttons */
|
||||
control = META_FRAME_CONTROL_NONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (control == frame->prelit_control)
|
||||
return;
|
||||
@@ -1546,7 +1546,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
/* Update prelit control and cursor */
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1562,7 +1562,7 @@ meta_frames_destroy_event (GtkWidget *widget,
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1600,7 +1600,7 @@ clip_region_to_visible_frame_border (cairo_region_t *region,
|
||||
MetaFrameBorders borders;
|
||||
Display *display;
|
||||
int frame_width, frame_height;
|
||||
|
||||
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
|
||||
meta_core_get (display, frame->xwindow,
|
||||
@@ -1611,7 +1611,7 @@ clip_region_to_visible_frame_border (cairo_region_t *region,
|
||||
META_CORE_GET_END);
|
||||
|
||||
meta_theme_get_frame_borders (meta_theme_get_current (),
|
||||
type, frame->text_height, flags,
|
||||
type, frame->text_height, flags,
|
||||
&borders);
|
||||
|
||||
/* Visible frame rect */
|
||||
@@ -1768,7 +1768,7 @@ meta_frames_draw (GtkWidget *widget,
|
||||
|
||||
out:
|
||||
cairo_region_destroy (region);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1792,7 +1792,7 @@ meta_frames_paint (MetaFrames *frames,
|
||||
|
||||
for (i = 0; i < META_BUTTON_TYPE_LAST; i++)
|
||||
button_states[i] = META_BUTTON_STATE_NORMAL;
|
||||
|
||||
|
||||
/* Set prelight state */
|
||||
switch (frame->prelit_control)
|
||||
{
|
||||
@@ -1915,7 +1915,7 @@ meta_frames_enter_notify_event (GtkWidget *widget,
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
MetaFrameControl control;
|
||||
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
@@ -1924,7 +1924,7 @@ meta_frames_enter_notify_event (GtkWidget *widget,
|
||||
|
||||
control = get_control (frames, frame, event->x, event->y);
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1942,7 +1942,7 @@ meta_frames_leave_notify_event (GtkWidget *widget,
|
||||
return FALSE;
|
||||
|
||||
meta_frames_update_prelit_control (frames, frame, META_FRAME_CONTROL_NONE);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1951,7 +1951,7 @@ control_rect (MetaFrameControl control,
|
||||
MetaFrameGeometry *fgeom)
|
||||
{
|
||||
GdkRectangle *rect;
|
||||
|
||||
|
||||
rect = NULL;
|
||||
switch (control)
|
||||
{
|
||||
@@ -2033,7 +2033,7 @@ get_control (MetaFrames *frames,
|
||||
|
||||
if (POINT_IN_RECT (x, y, client))
|
||||
return META_FRAME_CONTROL_CLIENT_AREA;
|
||||
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.close_rect.clickable))
|
||||
return META_FRAME_CONTROL_DELETE;
|
||||
|
||||
@@ -2068,7 +2068,7 @@ get_control (MetaFrames *frames,
|
||||
else
|
||||
return META_FRAME_CONTROL_MAXIMIZE;
|
||||
}
|
||||
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.shade_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_SHADE;
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
/* Metacity window frame manager widget */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
@@ -14,7 +14,7 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -79,7 +79,7 @@ struct _MetaUIFrame
|
||||
int text_height;
|
||||
char *title; /* NULL once we have a layout */
|
||||
guint shape_applied : 1;
|
||||
|
||||
|
||||
/* FIXME get rid of this, it can just be in the MetaFrames struct */
|
||||
MetaFrameControl prelit_control;
|
||||
MetaButtonState button_state;
|
||||
@@ -89,7 +89,7 @@ struct _MetaUIFrame
|
||||
struct _MetaFrames
|
||||
{
|
||||
GtkWindow parent_instance;
|
||||
|
||||
|
||||
GHashTable *text_heights;
|
||||
|
||||
GHashTable *frames;
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington, 99% copied from wrlib in
|
||||
* WindowMaker, Copyright (C) 1997-2000 Dan Pascu and Alfredo Kojima
|
||||
* Copyright (C) 2005 Elijah Newren
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
@@ -14,7 +14,7 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
@@ -76,7 +76,7 @@ blank_pixbuf (int width, int height, gboolean no_padding)
|
||||
if (no_padding)
|
||||
rowstride = width * 3;
|
||||
else
|
||||
/* Always align rows to 32-bit boundaries */
|
||||
/* Always align rows to 32-bit boundaries */
|
||||
rowstride = 4 * ((3 * width + 3) / 4);
|
||||
|
||||
buf = g_try_malloc (height * rowstride);
|
||||
@@ -194,7 +194,7 @@ meta_gradient_create_interwoven (int width,
|
||||
const GdkRGBA colors2[2],
|
||||
int thickness2)
|
||||
{
|
||||
|
||||
|
||||
int i, j, k, l, ll;
|
||||
long r1, g1, b1, dr1, dg1, db1;
|
||||
long r2, g2, b2, dr2, dg2, db2;
|
||||
@@ -202,14 +202,14 @@ meta_gradient_create_interwoven (int width,
|
||||
unsigned char *ptr;
|
||||
unsigned char *pixels;
|
||||
int rowstride;
|
||||
|
||||
|
||||
pixbuf = blank_pixbuf (width, height, FALSE);
|
||||
if (pixbuf == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
|
||||
|
||||
r1 = (long)(colors1[0].red*0xffffff);
|
||||
g1 = (long)(colors1[0].green*0xffffff);
|
||||
b1 = (long)(colors1[0].blue*0xffffff);
|
||||
@@ -229,7 +229,7 @@ meta_gradient_create_interwoven (int width,
|
||||
for (i=0,k=0,l=0,ll=thickness1; i<height; i++)
|
||||
{
|
||||
ptr = pixels + i * rowstride;
|
||||
|
||||
|
||||
if (k == 0)
|
||||
{
|
||||
ptr[0] = (unsigned char) (r1>>16);
|
||||
@@ -264,7 +264,7 @@ meta_gradient_create_interwoven (int width,
|
||||
r1+=dr1;
|
||||
g1+=dg1;
|
||||
b1+=db1;
|
||||
|
||||
|
||||
r2+=dr2;
|
||||
g2+=dg2;
|
||||
b2+=db2;
|
||||
@@ -277,20 +277,20 @@ meta_gradient_create_interwoven (int width,
|
||||
*----------------------------------------------------------------------
|
||||
* meta_gradient_create_horizontal--
|
||||
* Renders a horizontal linear gradient of the specified size in the
|
||||
* GdkPixbuf format with a border of the specified type.
|
||||
*
|
||||
* GdkPixbuf format with a border of the specified type.
|
||||
*
|
||||
* Returns:
|
||||
* A 24bit GdkPixbuf with the gradient (no alpha channel).
|
||||
*
|
||||
*
|
||||
* Side effects:
|
||||
* None
|
||||
*----------------------------------------------------------------------
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
static GdkPixbuf*
|
||||
meta_gradient_create_horizontal (int width, int height,
|
||||
const GdkRGBA *from,
|
||||
const GdkRGBA *to)
|
||||
{
|
||||
{
|
||||
int i;
|
||||
long r, g, b, dr, dg, db;
|
||||
GdkPixbuf *pixbuf;
|
||||
@@ -303,22 +303,22 @@ meta_gradient_create_horizontal (int width, int height,
|
||||
pixbuf = blank_pixbuf (width, height, FALSE);
|
||||
if (pixbuf == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
ptr = pixels;
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
|
||||
|
||||
r0 = (guchar) (from->red * 0xff);
|
||||
g0 = (guchar) (from->green * 0xff);
|
||||
b0 = (guchar) (from->blue * 0xff);
|
||||
rf = (guchar) (to->red * 0xff);
|
||||
gf = (guchar) (to->green * 0xff);
|
||||
bf = (guchar) (to->blue * 0xff);
|
||||
|
||||
|
||||
r = r0 << 16;
|
||||
g = g0 << 16;
|
||||
b = b0 << 16;
|
||||
|
||||
|
||||
dr = ((rf-r0)<<16)/(int)width;
|
||||
dg = ((gf-g0)<<16)/(int)width;
|
||||
db = ((bf-b0)<<16)/(int)width;
|
||||
@@ -367,21 +367,21 @@ meta_gradient_create_vertical (int width, int height,
|
||||
int rf, gf, bf;
|
||||
int rowstride;
|
||||
unsigned char *pixels;
|
||||
|
||||
|
||||
pixbuf = blank_pixbuf (width, height, FALSE);
|
||||
if (pixbuf == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
|
||||
|
||||
r0 = (guchar) (from->red * 0xff);
|
||||
g0 = (guchar) (from->green * 0xff);
|
||||
b0 = (guchar) (from->blue * 0xff);
|
||||
rf = (guchar) (to->red * 0xff);
|
||||
gf = (guchar) (to->green * 0xff);
|
||||
bf = (guchar) (to->blue * 0xff);
|
||||
|
||||
|
||||
r = r0<<16;
|
||||
g = g0<<16;
|
||||
b = b0<<16;
|
||||
@@ -393,7 +393,7 @@ meta_gradient_create_vertical (int width, int height,
|
||||
for (i=0; i<height; i++)
|
||||
{
|
||||
ptr = pixels + i * rowstride;
|
||||
|
||||
|
||||
ptr[0] = (unsigned char)(r>>16);
|
||||
ptr[1] = (unsigned char)(g>>16);
|
||||
ptr[2] = (unsigned char)(b>>16);
|
||||
@@ -436,7 +436,7 @@ meta_gradient_create_diagonal (int width, int height,
|
||||
unsigned char *ptr;
|
||||
unsigned char *pixels;
|
||||
int rowstride;
|
||||
|
||||
|
||||
if (width == 1)
|
||||
return meta_gradient_create_vertical (width, height, from, to);
|
||||
else if (height == 1)
|
||||
@@ -445,7 +445,7 @@ meta_gradient_create_diagonal (int width, int height,
|
||||
pixbuf = blank_pixbuf (width, height, FALSE);
|
||||
if (pixbuf == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
|
||||
@@ -483,27 +483,27 @@ meta_gradient_create_multi_horizontal (int width, int height,
|
||||
GdkPixbuf *pixbuf;
|
||||
unsigned char *ptr;
|
||||
unsigned char *pixels;
|
||||
int width2;
|
||||
int width2;
|
||||
int rowstride;
|
||||
|
||||
|
||||
g_return_val_if_fail (count > 2, NULL);
|
||||
|
||||
pixbuf = blank_pixbuf (width, height, FALSE);
|
||||
if (pixbuf == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
ptr = pixels;
|
||||
|
||||
|
||||
if (count > width)
|
||||
count = width;
|
||||
|
||||
|
||||
if (count > 1)
|
||||
width2 = width/(count-1);
|
||||
else
|
||||
width2 = width;
|
||||
|
||||
|
||||
k = 0;
|
||||
|
||||
r = (long)(colors[0].red * 0xffffff);
|
||||
@@ -536,7 +536,7 @@ meta_gradient_create_multi_horizontal (int width, int height,
|
||||
*ptr++ = (unsigned char)(g>>16);
|
||||
*ptr++ = (unsigned char)(b>>16);
|
||||
}
|
||||
|
||||
|
||||
/* copy the first line to the other lines */
|
||||
for (i=1; i<height; i++)
|
||||
{
|
||||
@@ -557,25 +557,25 @@ meta_gradient_create_multi_vertical (int width, int height,
|
||||
int height2;
|
||||
int x;
|
||||
int rowstride;
|
||||
|
||||
|
||||
g_return_val_if_fail (count > 2, NULL);
|
||||
|
||||
pixbuf = blank_pixbuf (width, height, FALSE);
|
||||
if (pixbuf == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
ptr = pixels;
|
||||
|
||||
|
||||
if (count > height)
|
||||
count = height;
|
||||
|
||||
|
||||
if (count > 1)
|
||||
height2 = height/(count-1);
|
||||
else
|
||||
height2 = height;
|
||||
|
||||
|
||||
k = 0;
|
||||
|
||||
r = (long)(colors[0].red * 0xffffff);
|
||||
@@ -599,7 +599,7 @@ meta_gradient_create_multi_vertical (int width, int height,
|
||||
memcpy (&(ptr[x*3]), ptr, (width - x)*3);
|
||||
|
||||
ptr += rowstride;
|
||||
|
||||
|
||||
r += dr;
|
||||
g += dg;
|
||||
b += db;
|
||||
@@ -623,14 +623,14 @@ meta_gradient_create_multi_vertical (int width, int height,
|
||||
memcpy (&(ptr[x*3]), ptr, (width - x)*3);
|
||||
|
||||
ptr += rowstride;
|
||||
|
||||
|
||||
for (j=k+1; j<height; j++)
|
||||
{
|
||||
memcpy (ptr, tmp, rowstride);
|
||||
ptr += rowstride;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return pixbuf;
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ meta_gradient_create_multi_diagonal (int width, int height,
|
||||
unsigned char *ptr;
|
||||
unsigned char *pixels;
|
||||
int rowstride;
|
||||
|
||||
|
||||
g_return_val_if_fail (count > 2, NULL);
|
||||
|
||||
if (width == 1)
|
||||
@@ -658,10 +658,10 @@ meta_gradient_create_multi_diagonal (int width, int height,
|
||||
width, height);
|
||||
if (pixbuf == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
|
||||
|
||||
if (count > width)
|
||||
count = width;
|
||||
if (count > height)
|
||||
@@ -708,12 +708,12 @@ simple_multiply_alpha (GdkPixbuf *pixbuf,
|
||||
int row;
|
||||
|
||||
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
|
||||
|
||||
|
||||
if (alpha == 255)
|
||||
return;
|
||||
|
||||
|
||||
g_assert (gdk_pixbuf_get_has_alpha (pixbuf));
|
||||
|
||||
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
height = gdk_pixbuf_get_height (pixbuf);
|
||||
@@ -738,7 +738,7 @@ simple_multiply_alpha (GdkPixbuf *pixbuf,
|
||||
*/
|
||||
/* ((*p / 255.0) * (alpha / 255.0)) * 255; */
|
||||
*p = (guchar) (((int) *p * (int) alpha) / (int) 255);
|
||||
|
||||
|
||||
++p; /* skip A */
|
||||
}
|
||||
|
||||
@@ -755,13 +755,13 @@ meta_gradient_add_alpha_horizontal (GdkPixbuf *pixbuf,
|
||||
long a, da;
|
||||
unsigned char *p;
|
||||
unsigned char *pixels;
|
||||
int width2;
|
||||
int width2;
|
||||
int rowstride;
|
||||
int width, height;
|
||||
unsigned char *gradient;
|
||||
unsigned char *gradient_p;
|
||||
unsigned char *gradient_end;
|
||||
|
||||
|
||||
g_return_if_fail (n_alphas > 0);
|
||||
|
||||
if (n_alphas == 1)
|
||||
@@ -770,24 +770,24 @@ meta_gradient_add_alpha_horizontal (GdkPixbuf *pixbuf,
|
||||
simple_multiply_alpha (pixbuf, alphas[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
width = gdk_pixbuf_get_width (pixbuf);
|
||||
height = gdk_pixbuf_get_height (pixbuf);
|
||||
|
||||
gradient = g_new (unsigned char, width);
|
||||
gradient_end = gradient + width;
|
||||
|
||||
|
||||
if (n_alphas > width)
|
||||
n_alphas = width;
|
||||
|
||||
|
||||
if (n_alphas > 1)
|
||||
width2 = width / (n_alphas - 1);
|
||||
else
|
||||
width2 = width;
|
||||
|
||||
|
||||
a = alphas[0] << 8;
|
||||
gradient_p = gradient;
|
||||
|
||||
|
||||
/* render the gradient into an array */
|
||||
for (i = 1; i < n_alphas; i++)
|
||||
{
|
||||
@@ -796,7 +796,7 @@ meta_gradient_add_alpha_horizontal (GdkPixbuf *pixbuf,
|
||||
for (j = 0; j < width2; j++)
|
||||
{
|
||||
*gradient_p++ = (a >> 8);
|
||||
|
||||
|
||||
a += da;
|
||||
}
|
||||
|
||||
@@ -808,11 +808,11 @@ meta_gradient_add_alpha_horizontal (GdkPixbuf *pixbuf,
|
||||
{
|
||||
*gradient_p++ = a >> 8;
|
||||
}
|
||||
|
||||
|
||||
/* Now for each line of the pixbuf, fill in with the gradient */
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
|
||||
|
||||
p = pixels;
|
||||
i = 0;
|
||||
while (i < height)
|
||||
@@ -838,7 +838,7 @@ meta_gradient_add_alpha_horizontal (GdkPixbuf *pixbuf,
|
||||
p = row_end;
|
||||
++i;
|
||||
}
|
||||
|
||||
|
||||
g_free (gradient);
|
||||
}
|
||||
|
||||
@@ -851,21 +851,21 @@ meta_gradient_add_alpha (GdkPixbuf *pixbuf,
|
||||
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
|
||||
g_return_if_fail (gdk_pixbuf_get_has_alpha (pixbuf));
|
||||
g_return_if_fail (n_alphas > 0);
|
||||
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case META_GRADIENT_HORIZONTAL:
|
||||
meta_gradient_add_alpha_horizontal (pixbuf, alphas, n_alphas);
|
||||
break;
|
||||
|
||||
|
||||
case META_GRADIENT_VERTICAL:
|
||||
g_printerr ("metacity: vertical alpha channel gradient not implemented yet\n");
|
||||
break;
|
||||
|
||||
|
||||
case META_GRADIENT_DIAGONAL:
|
||||
g_printerr ("metacity: diagonal alpha channel gradient not implemented yet\n");
|
||||
break;
|
||||
|
||||
|
||||
case META_GRADIENT_LAST:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
@@ -2,11 +2,11 @@
|
||||
|
||||
/* Mutter window menu */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2004 Rob Adams
|
||||
* Copyright (C) 2005 Elijah Newren
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
@@ -16,7 +16,7 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -107,18 +107,18 @@ popup_position_func (GtkMenu *menu,
|
||||
gboolean *push_in,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkRequisition req;
|
||||
GtkRequisition req;
|
||||
GdkPoint *pos;
|
||||
|
||||
pos = user_data;
|
||||
|
||||
|
||||
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
|
||||
|
||||
*x = pos->x;
|
||||
*y = pos->y;
|
||||
|
||||
|
||||
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
|
||||
*x = MAX (0, *x - req.width);
|
||||
*x = MAX (0, *x - req.width);
|
||||
|
||||
/* Ensure onscreen */
|
||||
*x = CLAMP (*x, 0, MAX (0, gdk_screen_width () - req.width));
|
||||
@@ -130,7 +130,7 @@ menu_closed (GtkMenu *widget,
|
||||
gpointer data)
|
||||
{
|
||||
MetaWindowMenu *menu;
|
||||
|
||||
|
||||
menu = data;
|
||||
|
||||
(* menu->func) (menu,
|
||||
@@ -139,7 +139,7 @@ menu_closed (GtkMenu *widget,
|
||||
gtk_get_current_event_time (),
|
||||
0, 0,
|
||||
menu->data);
|
||||
|
||||
|
||||
/* menu may now be freed */
|
||||
}
|
||||
|
||||
@@ -147,9 +147,9 @@ static void
|
||||
activate_cb (GtkWidget *menuitem, gpointer data)
|
||||
{
|
||||
MenuData *md;
|
||||
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (menuitem));
|
||||
|
||||
|
||||
md = data;
|
||||
|
||||
(* md->menu->func) (md->menu,
|
||||
@@ -169,7 +169,7 @@ activate_cb (GtkWidget *menuitem, gpointer data)
|
||||
* accelerators. At the moment this means adding a _ if the name is of
|
||||
* the form "Workspace n" where n is less than 10, and escaping any
|
||||
* other '_'s so they do not create inadvertant accelerators.
|
||||
*
|
||||
*
|
||||
* The calling code owns the string, and is reponsible to free the
|
||||
* memory after use.
|
||||
*
|
||||
@@ -188,7 +188,7 @@ get_workspace_name_with_accel (Display *display,
|
||||
name = meta_core_get_workspace_name_with_index (display, xroot, index);
|
||||
|
||||
g_assert (name != NULL);
|
||||
|
||||
|
||||
/*
|
||||
* If the name is of the form "Workspace x" where x is an unsigned
|
||||
* integer, insert a '_' before the number if it is less than 10 and
|
||||
@@ -199,7 +199,7 @@ get_workspace_name_with_accel (Display *display,
|
||||
*(name + charcount)=='\0')
|
||||
{
|
||||
char *new_name;
|
||||
|
||||
|
||||
/*
|
||||
* Above name is a pointer into the Workspace struct. Here we make
|
||||
* a copy copy so we can have our wicked way with it.
|
||||
@@ -271,10 +271,10 @@ menu_item_new (MenuItem *menuitem, int workspace_id)
|
||||
else if (menuitem->type == MENU_ITEM_CHECKBOX)
|
||||
{
|
||||
mi = gtk_check_menu_item_new ();
|
||||
|
||||
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi),
|
||||
menuitem->checked);
|
||||
}
|
||||
}
|
||||
else if (menuitem->type == MENU_ITEM_RADIOBUTTON)
|
||||
{
|
||||
mi = gtk_check_menu_item_new ();
|
||||
@@ -300,7 +300,7 @@ menu_item_new (MenuItem *menuitem, int workspace_id)
|
||||
|
||||
meta_accel_label_set_accelerator (META_ACCEL_LABEL (accel_label),
|
||||
key, mods);
|
||||
|
||||
|
||||
return mi;
|
||||
}
|
||||
|
||||
@@ -320,18 +320,18 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
/* FIXME: Modifications to 'ops' should happen in meta_window_show_menu */
|
||||
if (n_workspaces < 2)
|
||||
ops &= ~(META_MENU_OP_STICK | META_MENU_OP_UNSTICK | META_MENU_OP_WORKSPACES);
|
||||
else if (n_workspaces == 2)
|
||||
else if (n_workspaces == 2)
|
||||
/* #151183: If we only have two workspaces, disable the menu listing them. */
|
||||
ops &= ~(META_MENU_OP_WORKSPACES);
|
||||
|
||||
|
||||
menu = g_new (MetaWindowMenu, 1);
|
||||
menu->frames = frames;
|
||||
menu->client_xwindow = client_xwindow;
|
||||
menu->func = func;
|
||||
menu->data = data;
|
||||
menu->ops = ops;
|
||||
menu->insensitive = insensitive;
|
||||
|
||||
menu->insensitive = insensitive;
|
||||
|
||||
menu->menu = gtk_menu_new ();
|
||||
|
||||
gtk_menu_set_screen (GTK_MENU (menu->menu),
|
||||
@@ -450,12 +450,12 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
|
||||
if (insensitive & menuitem.op)
|
||||
gtk_widget_set_sensitive (mi, FALSE);
|
||||
|
||||
|
||||
md = g_new (MenuData, 1);
|
||||
|
||||
|
||||
md->menu = menu;
|
||||
md->op = menuitem.op;
|
||||
|
||||
|
||||
g_signal_connect_data (G_OBJECT (mi),
|
||||
"activate",
|
||||
G_CALLBACK (activate_cb),
|
||||
@@ -466,15 +466,15 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
if (mi)
|
||||
{
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu->menu), mi);
|
||||
|
||||
|
||||
gtk_widget_show (mi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
g_signal_connect (menu->menu, "selection_done",
|
||||
G_CALLBACK (menu_closed), menu);
|
||||
G_CALLBACK (menu_closed), menu);
|
||||
|
||||
return menu;
|
||||
}
|
||||
@@ -487,7 +487,7 @@ meta_window_menu_popup (MetaWindowMenu *menu,
|
||||
guint32 timestamp)
|
||||
{
|
||||
GdkPoint *pt;
|
||||
|
||||
|
||||
pt = g_new (GdkPoint, 1);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (menu->menu),
|
||||
@@ -497,7 +497,7 @@ meta_window_menu_popup (MetaWindowMenu *menu,
|
||||
|
||||
pt->x = root_x;
|
||||
pt->y = root_y;
|
||||
|
||||
|
||||
gtk_menu_popup (GTK_MENU (menu->menu),
|
||||
NULL, NULL,
|
||||
popup_position_func, pt,
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
/* Mutter window menu */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
@@ -14,7 +14,7 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
@@ -271,9 +271,9 @@ meta_accel_label_draw (GtkWidget *widget,
|
||||
cairo_translate (cr, ac_width, 0);
|
||||
if (gtk_label_get_ellipsize (label))
|
||||
pango_layout_set_width (label_layout,
|
||||
pango_layout_get_width (label_layout)
|
||||
pango_layout_get_width (label_layout)
|
||||
- ac_width * PANGO_SCALE);
|
||||
|
||||
|
||||
allocation.width -= ac_width;
|
||||
gtk_widget_set_allocation (widget, &allocation);
|
||||
if (GTK_WIDGET_CLASS (meta_accel_label_parent_class)->draw)
|
||||
@@ -283,7 +283,7 @@ meta_accel_label_draw (GtkWidget *widget,
|
||||
gtk_widget_set_allocation (widget, &allocation);
|
||||
if (gtk_label_get_ellipsize (label))
|
||||
pango_layout_set_width (label_layout,
|
||||
pango_layout_get_width (label_layout)
|
||||
pango_layout_get_width (label_layout)
|
||||
+ ac_width * PANGO_SCALE);
|
||||
|
||||
cairo_restore (cr);
|
||||
@@ -318,7 +318,7 @@ meta_accel_label_draw (GtkWidget *widget,
|
||||
if (GTK_WIDGET_CLASS (meta_accel_label_parent_class)->draw)
|
||||
GTK_WIDGET_CLASS (meta_accel_label_parent_class)->draw (widget, cr);
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
/* Metacity resizing-terminal-window feedback */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
@@ -14,7 +14,7 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -30,13 +30,13 @@ struct _MetaResizePopup
|
||||
GtkWidget *size_window;
|
||||
GtkWidget *size_label;
|
||||
Display *display;
|
||||
int screen_number;
|
||||
int screen_number;
|
||||
|
||||
int vertical_size;
|
||||
int horizontal_size;
|
||||
|
||||
|
||||
gboolean showing;
|
||||
|
||||
|
||||
MetaRectangle rect;
|
||||
};
|
||||
|
||||
@@ -50,7 +50,7 @@ meta_ui_resize_popup_new (Display *display,
|
||||
|
||||
popup->display = display;
|
||||
popup->screen_number = screen_number;
|
||||
|
||||
|
||||
return popup;
|
||||
}
|
||||
|
||||
@@ -58,10 +58,10 @@ void
|
||||
meta_ui_resize_popup_free (MetaResizePopup *popup)
|
||||
{
|
||||
g_return_if_fail (popup != NULL);
|
||||
|
||||
|
||||
if (popup->size_window)
|
||||
gtk_widget_destroy (popup->size_window);
|
||||
|
||||
|
||||
g_free (popup);
|
||||
}
|
||||
|
||||
@@ -125,9 +125,9 @@ update_size_window (MetaResizePopup *popup)
|
||||
char *str;
|
||||
int x, y;
|
||||
int width, height;
|
||||
|
||||
|
||||
g_return_if_fail (popup->size_window != NULL);
|
||||
|
||||
|
||||
/* Translators: This represents the size of a window. The first number is
|
||||
* the width of the window and the second is the height.
|
||||
*/
|
||||
@@ -143,7 +143,7 @@ update_size_window (MetaResizePopup *popup)
|
||||
|
||||
x = popup->rect.x + (popup->rect.width - width) / 2;
|
||||
y = popup->rect.y + (popup->rect.height - height) / 2;
|
||||
|
||||
|
||||
if (gtk_widget_get_realized (popup->size_window))
|
||||
{
|
||||
/* using move_resize to avoid jumpiness */
|
||||
@@ -165,7 +165,7 @@ sync_showing (MetaResizePopup *popup)
|
||||
{
|
||||
if (popup->size_window)
|
||||
gtk_widget_show (popup->size_window);
|
||||
|
||||
|
||||
if (popup->size_window && gtk_widget_get_realized (popup->size_window))
|
||||
gdk_window_raise (gtk_widget_get_window (popup->size_window));
|
||||
}
|
||||
@@ -186,11 +186,11 @@ meta_ui_resize_popup_set (MetaResizePopup *popup,
|
||||
{
|
||||
gboolean need_update_size;
|
||||
int display_w, display_h;
|
||||
|
||||
|
||||
g_return_if_fail (popup != NULL);
|
||||
|
||||
need_update_size = FALSE;
|
||||
|
||||
|
||||
display_w = rect.width - base_width;
|
||||
if (width_inc > 0)
|
||||
display_w /= width_inc;
|
||||
@@ -203,17 +203,17 @@ meta_ui_resize_popup_set (MetaResizePopup *popup,
|
||||
display_w != popup->horizontal_size ||
|
||||
display_h != popup->vertical_size)
|
||||
need_update_size = TRUE;
|
||||
|
||||
|
||||
popup->rect = rect;
|
||||
popup->vertical_size = display_h;
|
||||
popup->horizontal_size = display_w;
|
||||
|
||||
|
||||
if (need_update_size)
|
||||
{
|
||||
ensure_size_window (popup);
|
||||
update_size_window (popup);
|
||||
}
|
||||
|
||||
|
||||
sync_showing (popup);
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ meta_ui_resize_popup_set_showing (MetaResizePopup *popup,
|
||||
gboolean showing)
|
||||
{
|
||||
g_return_if_fail (popup != NULL);
|
||||
|
||||
|
||||
if (showing == popup->showing)
|
||||
return;
|
||||
|
||||
@@ -233,6 +233,6 @@ meta_ui_resize_popup_set_showing (MetaResizePopup *popup,
|
||||
ensure_size_window (popup);
|
||||
update_size_window (popup);
|
||||
}
|
||||
|
||||
|
||||
sync_showing (popup);
|
||||
}
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
/* Mutter resizing-terminal-window feedback */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
@@ -14,7 +14,7 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
/* Mutter gradient test program */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2002 Havoc Pennington
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
@@ -14,7 +14,7 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
@@ -32,9 +32,9 @@ draw_checkerboard (cairo_t *cr,
|
||||
{
|
||||
gint i, j, xcount, ycount;
|
||||
GdkRGBA color1, color2;
|
||||
|
||||
|
||||
#define CHECK_SIZE 10
|
||||
#define SPACING 2
|
||||
#define SPACING 2
|
||||
|
||||
color1.red = 30000. / 65535.;
|
||||
color1.green = 30000. / 65535.;
|
||||
@@ -83,7 +83,7 @@ render_simple (cairo_t *cr,
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
GdkRGBA from, to;
|
||||
|
||||
|
||||
gdk_rgba_parse (&from, "blue");
|
||||
gdk_rgba_parse (&to, "green");
|
||||
|
||||
@@ -94,23 +94,23 @@ render_simple (cairo_t *cr,
|
||||
if (with_alpha)
|
||||
{
|
||||
const unsigned char alphas[] = { 0xff, 0xaa, 0x2f, 0x0, 0xcc, 0xff, 0xff };
|
||||
|
||||
|
||||
if (!gdk_pixbuf_get_has_alpha (pixbuf))
|
||||
{
|
||||
GdkPixbuf *new_pixbuf;
|
||||
|
||||
|
||||
new_pixbuf = gdk_pixbuf_add_alpha (pixbuf, FALSE, 0, 0, 0);
|
||||
g_object_unref (G_OBJECT (pixbuf));
|
||||
pixbuf = new_pixbuf;
|
||||
}
|
||||
|
||||
|
||||
meta_gradient_add_alpha (pixbuf,
|
||||
alphas, G_N_ELEMENTS (alphas),
|
||||
META_GRADIENT_HORIZONTAL);
|
||||
|
||||
|
||||
draw_checkerboard (cr , width, height);
|
||||
}
|
||||
|
||||
|
||||
gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_fill (cr);
|
||||
@@ -253,13 +253,13 @@ create_gradient_window (const char *title,
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), title);
|
||||
|
||||
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
|
||||
gtk_widget_set_size_request (drawing_area, 1, 1);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 175, 175);
|
||||
|
||||
|
||||
g_signal_connect (G_OBJECT (drawing_area),
|
||||
"draw",
|
||||
G_CALLBACK (draw_callback),
|
||||
@@ -268,7 +268,7 @@ create_gradient_window (const char *title,
|
||||
gtk_container_add (GTK_CONTAINER (window), drawing_area);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -2,9 +2,9 @@
|
||||
|
||||
/* Metacity Theme Rendering */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
@@ -14,7 +14,7 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ typedef struct _MetaGradientSpec MetaGradientSpec;
|
||||
* MetaAlphaGradientSpec: (skip)
|
||||
*
|
||||
*/
|
||||
typedef struct _MetaAlphaGradientSpec MetaAlphaGradientSpec;
|
||||
typedef struct _MetaAlphaGradientSpec MetaAlphaGradientSpec;
|
||||
/**
|
||||
* MetaColorSpec: (skip)
|
||||
*
|
||||
@@ -131,14 +131,14 @@ struct _MetaFrameLayout
|
||||
{
|
||||
/** Reference count. */
|
||||
int refcount;
|
||||
|
||||
|
||||
/** Size of left side */
|
||||
int left_width;
|
||||
/** Size of right side */
|
||||
int right_width;
|
||||
/** Size of bottom side */
|
||||
int bottom_height;
|
||||
|
||||
|
||||
/** Border of blue title region
|
||||
* \bug (blue?!)
|
||||
**/
|
||||
@@ -146,12 +146,12 @@ struct _MetaFrameLayout
|
||||
|
||||
/** Extra height for inside of title region, above the font height */
|
||||
int title_vertical_pad;
|
||||
|
||||
|
||||
/** Right indent of buttons from edges of frame */
|
||||
int right_titlebar_edge;
|
||||
/** Left indent of buttons from edges of frame */
|
||||
int left_titlebar_edge;
|
||||
|
||||
|
||||
/**
|
||||
* Sizing rule of buttons, either META_BUTTON_SIZING_ASPECT
|
||||
* (in which case button_aspect will be honoured, and
|
||||
@@ -167,7 +167,7 @@ struct _MetaFrameLayout
|
||||
* Otherwise we figure out the height from the button_border.
|
||||
*/
|
||||
double button_aspect;
|
||||
|
||||
|
||||
/** Width of a button; set even when we are using aspect sizing */
|
||||
int button_width;
|
||||
|
||||
@@ -179,7 +179,7 @@ struct _MetaFrameLayout
|
||||
|
||||
/** scale factor for title text */
|
||||
double title_scale;
|
||||
|
||||
|
||||
/** Whether title text will be displayed */
|
||||
guint has_title : 1;
|
||||
|
||||
@@ -218,7 +218,7 @@ struct _MetaFrameGeometry
|
||||
MetaFrameBorders borders;
|
||||
|
||||
int width;
|
||||
int height;
|
||||
int height;
|
||||
|
||||
GdkRectangle title_rect;
|
||||
|
||||
@@ -230,7 +230,7 @@ struct _MetaFrameGeometry
|
||||
/* used for a memset hack */
|
||||
#define ADDRESS_OF_BUTTON_RECTS(fgeom) (((char*)(fgeom)) + G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
|
||||
#define LENGTH_OF_BUTTON_RECTS (G_STRUCT_OFFSET (MetaFrameGeometry, right_single_background) + sizeof (GdkRectangle) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
|
||||
|
||||
|
||||
/* The button rects (if changed adjust memset hack) */
|
||||
MetaButtonSpace close_rect;
|
||||
MetaButtonSpace max_rect;
|
||||
@@ -258,7 +258,7 @@ struct _MetaFrameGeometry
|
||||
MetaButtonLayout button_layout;
|
||||
int n_left_buttons;
|
||||
int n_right_buttons;
|
||||
|
||||
|
||||
/* Round corners */
|
||||
guint top_left_corner_rounded_radius;
|
||||
guint top_right_corner_rounded_radius;
|
||||
@@ -363,14 +363,14 @@ typedef enum
|
||||
|
||||
/** Clip to a rectangle */
|
||||
META_DRAW_CLIP,
|
||||
|
||||
|
||||
/* Texture thingies */
|
||||
|
||||
/** Just a filled rectangle with alpha */
|
||||
META_DRAW_TINT,
|
||||
META_DRAW_GRADIENT,
|
||||
META_DRAW_IMAGE,
|
||||
|
||||
|
||||
/** GTK theme engine stuff */
|
||||
META_DRAW_GTK_ARROW,
|
||||
META_DRAW_GTK_BOX,
|
||||
@@ -459,7 +459,7 @@ struct _MetaDrawSpec
|
||||
* otherwise it is zero.
|
||||
*/
|
||||
int value;
|
||||
|
||||
|
||||
/** A list of tokens in the expression. */
|
||||
PosToken *tokens;
|
||||
|
||||
@@ -517,7 +517,7 @@ struct _MetaDrawOp
|
||||
MetaDrawSpec *width;
|
||||
MetaDrawSpec *height;
|
||||
} clip;
|
||||
|
||||
|
||||
struct {
|
||||
MetaColorSpec *color_spec;
|
||||
MetaAlphaGradientSpec *alpha_spec;
|
||||
@@ -551,7 +551,7 @@ struct _MetaDrawOp
|
||||
unsigned int vertical_stripes : 1;
|
||||
unsigned int horizontal_stripes : 1;
|
||||
} image;
|
||||
|
||||
|
||||
struct {
|
||||
GtkStateFlags state;
|
||||
GtkShadowType shadow;
|
||||
@@ -577,7 +577,7 @@ struct _MetaDrawOp
|
||||
GtkStateFlags state;
|
||||
MetaDrawSpec *x;
|
||||
MetaDrawSpec *y1;
|
||||
MetaDrawSpec *y2;
|
||||
MetaDrawSpec *y2;
|
||||
} gtk_vline;
|
||||
|
||||
struct {
|
||||
@@ -615,7 +615,7 @@ struct _MetaDrawOp
|
||||
MetaDrawSpec *tile_width;
|
||||
MetaDrawSpec *tile_height;
|
||||
} tile;
|
||||
|
||||
|
||||
} data;
|
||||
};
|
||||
|
||||
@@ -690,7 +690,7 @@ typedef enum
|
||||
* | rather than |
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* entire frame */
|
||||
META_FRAME_PIECE_ENTIRE_BACKGROUND,
|
||||
/* entire titlebar background */
|
||||
@@ -756,7 +756,7 @@ struct _MetaFrameStyle
|
||||
};
|
||||
|
||||
/* Kinds of frame...
|
||||
*
|
||||
*
|
||||
* normal -> noresize / vert only / horz only / both
|
||||
* focused / unfocused
|
||||
* max -> focused / unfocused
|
||||
@@ -768,7 +768,7 @@ struct _MetaFrameStyle
|
||||
*
|
||||
* 14 window states times 7 or 8 window types. Except some
|
||||
* window types never get a frame so that narrows it down a bit.
|
||||
*
|
||||
*
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
|
430
src/ui/theme.c
430
src/ui/theme.c
File diff suppressed because it is too large
Load Diff
14
src/ui/ui.c
14
src/ui/ui.c
@@ -2,9 +2,9 @@
|
||||
|
||||
/* Mutter interface for talking to GTK+ UI module */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2002 Havoc Pennington
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
@@ -14,7 +14,7 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -330,7 +330,7 @@ meta_ui_create_frame_window (MetaUI *ui,
|
||||
gint attributes_mask;
|
||||
GdkWindow *window;
|
||||
GdkVisual *visual;
|
||||
|
||||
|
||||
/* Default depth/visual handles clients with weird visuals; they can
|
||||
* always be children of the root depth/visual obviously, but
|
||||
* e.g. DRI games can't be children of a parent that has the same
|
||||
@@ -379,7 +379,7 @@ meta_ui_create_frame_window (MetaUI *ui,
|
||||
&attrs, attributes_mask);
|
||||
|
||||
gdk_window_resize (window, width, height);
|
||||
|
||||
|
||||
meta_frames_manage_window (ui->frames, GDK_WINDOW_XID (window), window);
|
||||
|
||||
return GDK_WINDOW_XID (window);
|
||||
@@ -602,7 +602,7 @@ meta_ui_get_default_window_icon (MetaUI *ui)
|
||||
}
|
||||
|
||||
g_object_ref (G_OBJECT (default_icon));
|
||||
|
||||
|
||||
return default_icon;
|
||||
}
|
||||
|
||||
@@ -637,7 +637,7 @@ meta_ui_get_default_mini_icon (MetaUI *ui)
|
||||
}
|
||||
|
||||
g_object_ref (G_OBJECT (default_icon));
|
||||
|
||||
|
||||
return default_icon;
|
||||
}
|
||||
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
/* Mutter interface for talking to GTK+ UI module */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
@@ -14,7 +14,7 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user