mirror of
https://github.com/brl/mutter.git
synced 2025-07-04 01:54:15 +00:00
frames: Remove all other uses of meta_core_get
RIP.
This commit is contained in:
@ -34,6 +34,8 @@
|
||||
|
||||
#include "core/window-private.h"
|
||||
#include "core/frame.h"
|
||||
#include "x11/window-x11.h"
|
||||
#include "x11/window-x11-private.h"
|
||||
|
||||
#include <cairo-xlib.h>
|
||||
|
||||
@ -432,15 +434,11 @@ static void
|
||||
meta_ui_frame_calc_geometry (MetaUIFrame *frame,
|
||||
MetaFrameGeometry *fgeom)
|
||||
{
|
||||
int width, height;
|
||||
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,
|
||||
META_CORE_GET_END);
|
||||
MetaWindowX11 *window_x11 = META_WINDOW_X11 (frame->meta_window);
|
||||
MetaWindowX11Private *priv = window_x11->priv;
|
||||
|
||||
flags = meta_frame_get_flags (frame->meta_window->frame);
|
||||
type = meta_window_get_window_type (frame->meta_window);
|
||||
@ -454,7 +452,8 @@ meta_ui_frame_calc_geometry (MetaUIFrame *frame,
|
||||
type,
|
||||
frame->text_height,
|
||||
flags,
|
||||
width, height,
|
||||
priv->client_rect.width,
|
||||
priv->client_rect.height,
|
||||
&button_layout,
|
||||
fgeom);
|
||||
}
|
||||
@ -495,17 +494,12 @@ static void
|
||||
meta_ui_frame_attach_style (MetaUIFrame *frame)
|
||||
{
|
||||
MetaFrames *frames = frame->frames;
|
||||
gboolean has_frame;
|
||||
char *variant = NULL;
|
||||
const char *variant;
|
||||
|
||||
if (frame->style_info != NULL)
|
||||
meta_style_info_unref (frame->style_info);
|
||||
|
||||
meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
frame->xwindow,
|
||||
META_CORE_WINDOW_HAS_FRAME, &has_frame,
|
||||
META_CORE_GET_THEME_VARIANT, &variant,
|
||||
META_CORE_GET_END);
|
||||
variant = frame->meta_window->gtk_theme_variant;
|
||||
|
||||
if (variant == NULL || strcmp(variant, "normal") == 0)
|
||||
frame->style_info = meta_style_info_ref (frames->normal_style);
|
||||
@ -1405,19 +1399,12 @@ meta_frames_destroy_event (GtkWidget *widget,
|
||||
static cairo_region_t *
|
||||
get_visible_frame_border_region (MetaUIFrame *frame)
|
||||
{
|
||||
MetaRectangle frame_rect;
|
||||
cairo_rectangle_int_t area;
|
||||
cairo_region_t *frame_border;
|
||||
MetaFrameFlags flags;
|
||||
MetaFrameType type;
|
||||
MetaFrameBorders borders;
|
||||
Display *display;
|
||||
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_RECT, &frame_rect,
|
||||
META_CORE_GET_END);
|
||||
MetaRectangle frame_rect = frame->meta_window->rect;
|
||||
|
||||
flags = meta_frame_get_flags (frame->meta_window->frame);
|
||||
type = meta_window_get_window_type (frame->meta_window);
|
||||
@ -1473,10 +1460,7 @@ meta_ui_frame_get_mask (MetaUIFrame *frame,
|
||||
MetaFrameFlags flags;
|
||||
MetaRectangle frame_rect;
|
||||
|
||||
meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
frame->xwindow,
|
||||
META_CORE_GET_FRAME_RECT, &frame_rect,
|
||||
META_CORE_GET_END);
|
||||
meta_window_get_frame_rect (frame->meta_window, &frame_rect);
|
||||
|
||||
flags = meta_frame_get_flags (frame->meta_window->frame);
|
||||
|
||||
@ -1535,14 +1519,12 @@ meta_ui_frame_paint (MetaUIFrame *frame,
|
||||
MetaFrameFlags flags;
|
||||
MetaFrameType type;
|
||||
cairo_surface_t *mini_icon;
|
||||
int w, h;
|
||||
MetaButtonState button_states[META_BUTTON_TYPE_LAST];
|
||||
int i;
|
||||
int button_type = -1;
|
||||
MetaButtonLayout button_layout;
|
||||
Display *display;
|
||||
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
MetaWindowX11 *window_x11 = META_WINDOW_X11 (frame->meta_window);
|
||||
MetaWindowX11Private *priv = window_x11->priv;
|
||||
|
||||
for (i = 0; i < META_BUTTON_TYPE_LAST; i++)
|
||||
button_states[i] = META_BUTTON_STATE_NORMAL;
|
||||
@ -1593,12 +1575,7 @@ meta_ui_frame_paint (MetaUIFrame *frame,
|
||||
if (button_type > -1)
|
||||
button_states[button_type] = frame->button_state;
|
||||
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_MINI_ICON, &mini_icon,
|
||||
META_CORE_GET_CLIENT_WIDTH, &w,
|
||||
META_CORE_GET_CLIENT_HEIGHT, &h,
|
||||
META_CORE_GET_END);
|
||||
|
||||
mini_icon = frame->meta_window->mini_icon;
|
||||
flags = meta_frame_get_flags (frame->meta_window->frame);
|
||||
type = meta_window_get_window_type (frame->meta_window);
|
||||
|
||||
@ -1611,7 +1588,8 @@ meta_ui_frame_paint (MetaUIFrame *frame,
|
||||
cr,
|
||||
type,
|
||||
flags,
|
||||
w, h,
|
||||
priv->client_rect.width,
|
||||
priv->client_rect.height,
|
||||
frame->text_layout,
|
||||
frame->text_height,
|
||||
&button_layout,
|
||||
|
Reference in New Issue
Block a user