window: Remove unused and unnecessary parameters from meta_window_window_menu

This commit is contained in:
Jasper St. Pierre 2014-03-13 18:23:24 -04:00
parent d7771a30ee
commit cebb6b2779
7 changed files with 9 additions and 63 deletions

View File

@ -469,9 +469,6 @@ meta_core_change_workspace (Display *xdisplay,
void
meta_core_show_window_menu (Display *xdisplay,
Window frame_xwindow,
int root_x,
int root_y,
int button,
guint32 timestamp)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
@ -480,7 +477,7 @@ meta_core_show_window_menu (Display *xdisplay,
meta_window_raise (window);
meta_window_focus (window, timestamp);
meta_window_show_menu (window, root_x, root_y, button, timestamp);
meta_window_show_menu (window);
}
const char*

View File

@ -159,11 +159,9 @@ const char* meta_core_get_workspace_name_with_index (Display *xdisplay,
void meta_core_show_window_menu (Display *xdisplay,
Window frame_xwindow,
int root_x,
int root_y,
int button,
guint32 timestamp);
gboolean meta_core_begin_grab_op (Display *xdisplay,
Window frame_xwindow,
MetaGrabOp op,

View File

@ -2203,11 +2203,7 @@ meta_display_handle_event (MetaDisplay *display,
{
if (meta_prefs_get_raise_on_click ())
meta_window_raise (window);
meta_window_show_menu (window,
event->button.x,
event->button.y,
event->button.button,
event->any.time);
meta_window_show_menu (window);
bypass_clutter = TRUE;
bypass_wayland = TRUE;
}

View File

@ -2782,20 +2782,7 @@ handle_activate_window_menu (MetaDisplay *display,
gpointer dummy)
{
if (display->focus_window)
{
int x, y;
meta_window_get_position (display->focus_window,
&x, &y);
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
x += display->focus_window->rect.width;
meta_window_show_menu (display->focus_window,
x, y,
0,
event->time);
}
meta_window_show_menu (display->focus_window);
}
static void

View File

@ -628,11 +628,7 @@ void meta_window_set_current_workspace_hint (MetaWindow *window);
unsigned long meta_window_get_net_wm_desktop (MetaWindow *window);
void meta_window_show_menu (MetaWindow *window,
int root_x,
int root_y,
int button,
guint32 timestamp);
void meta_window_show_menu (MetaWindow *window);
gboolean meta_window_titlebar_is_onscreen (MetaWindow *window);
void meta_window_shove_titlebar_onscreen (MetaWindow *window);

View File

@ -7412,11 +7412,7 @@ meta_window_recalc_features (MetaWindow *window)
}
void
meta_window_show_menu (MetaWindow *window,
int root_x,
int root_y,
int button,
guint32 timestamp)
meta_window_show_menu (MetaWindow *window)
{
g_return_if_fail (!window->override_redirect);
meta_compositor_show_window_menu (window->display->compositor, window);

View File

@ -1106,9 +1106,6 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
case G_DESKTOP_TITLEBAR_ACTION_MENU:
meta_core_show_window_menu (display,
frame->xwindow,
event->x_root,
event->y_root,
event->button,
event->time);
break;
}
@ -1268,30 +1265,9 @@ meta_frames_button_press_event (GtkWidget *widget,
redraw_control (frames, frame, control);
if (op == META_GRAB_OP_CLICKING_MENU)
{
MetaFrameGeometry fgeom;
GdkRectangle *rect;
int dx, dy;
meta_frames_calc_geometry (frames, frame, &fgeom);
rect = control_rect (META_FRAME_CONTROL_MENU, &fgeom);
/* 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;
meta_core_show_window_menu (display,
frame->xwindow,
rect->x + dx,
rect->y + rect->height + dy,
event->button,
event->time);
}
meta_core_show_window_menu (display,
frame->xwindow,
event->time);
}
else if (event->button == 1 &&
(control == META_FRAME_CONTROL_RESIZE_SE ||