mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 23:46:33 -05:00
frames: Give Havoc and Owen a heart attack
Break down the beautiful core/ui abstraction barrier by inserting a pointer to MetaWindow into a MetaUIFrame. I'm a scoundrel, I know. We'll use this very soon to destroy meta_core_get.
This commit is contained in:
parent
cac660a5bc
commit
12135afa5e
@ -87,6 +87,7 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
|
||||
frame->ui_frame = meta_ui_create_frame (window->screen->ui,
|
||||
window->display->xdisplay,
|
||||
frame->window,
|
||||
visual,
|
||||
frame->rect.x,
|
||||
frame->rect.y,
|
||||
|
@ -512,6 +512,7 @@ meta_ui_frame_attach_style (MetaUIFrame *frame)
|
||||
|
||||
MetaUIFrame *
|
||||
meta_frames_manage_window (MetaFrames *frames,
|
||||
MetaWindow *meta_window,
|
||||
Window xwindow,
|
||||
GdkWindow *window)
|
||||
{
|
||||
@ -531,6 +532,7 @@ meta_frames_manage_window (MetaFrames *frames,
|
||||
/* Don't set event mask here, it's in frame.c */
|
||||
|
||||
frame->xwindow = xwindow;
|
||||
frame->meta_window = meta_window;
|
||||
frame->cache_layout = NULL;
|
||||
frame->text_layout = NULL;
|
||||
frame->text_height = -1;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <meta/common.h>
|
||||
#include <meta/types.h>
|
||||
#include "theme-private.h"
|
||||
|
||||
typedef enum
|
||||
@ -73,6 +74,7 @@ typedef struct _MetaUIFrame MetaUIFrame;
|
||||
struct _MetaUIFrame
|
||||
{
|
||||
MetaFrames *frames;
|
||||
MetaWindow *meta_window;
|
||||
Window xwindow;
|
||||
GdkWindow *window;
|
||||
MetaStyleInfo *style_info;
|
||||
@ -119,6 +121,7 @@ GType meta_frames_get_type (void) G_GNUC_CONST;
|
||||
MetaFrames *meta_frames_new (int screen_number);
|
||||
|
||||
MetaUIFrame * meta_frames_manage_window (MetaFrames *frames,
|
||||
MetaWindow *meta_window,
|
||||
Window xwindow,
|
||||
GdkWindow *window);
|
||||
|
||||
|
@ -326,6 +326,7 @@ set_background_none (Display *xdisplay,
|
||||
MetaUIFrame *
|
||||
meta_ui_create_frame (MetaUI *ui,
|
||||
Display *xdisplay,
|
||||
MetaWindow *meta_window,
|
||||
Visual *xvisual,
|
||||
gint x,
|
||||
gint y,
|
||||
@ -391,7 +392,7 @@ meta_ui_create_frame (MetaUI *ui,
|
||||
gdk_window_resize (window, width, height);
|
||||
set_background_none (xdisplay, GDK_WINDOW_XID (window));
|
||||
|
||||
return meta_frames_manage_window (ui->frames, GDK_WINDOW_XID (window), window);
|
||||
return meta_frames_manage_window (ui->frames, meta_window, GDK_WINDOW_XID (window), window);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/* Don't include gtk.h or gdk.h here */
|
||||
#include <meta/common.h>
|
||||
#include <meta/types.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <cairo.h>
|
||||
@ -52,6 +53,7 @@ void meta_ui_theme_get_frame_borders (MetaUI *ui,
|
||||
|
||||
MetaUIFrame * meta_ui_create_frame (MetaUI *ui,
|
||||
Display *xdisplay,
|
||||
MetaWindow *meta_window,
|
||||
Visual *xvisual,
|
||||
gint x,
|
||||
gint y,
|
||||
|
Loading…
Reference in New Issue
Block a user