mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -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,
|
frame->ui_frame = meta_ui_create_frame (window->screen->ui,
|
||||||
window->display->xdisplay,
|
window->display->xdisplay,
|
||||||
|
frame->window,
|
||||||
visual,
|
visual,
|
||||||
frame->rect.x,
|
frame->rect.x,
|
||||||
frame->rect.y,
|
frame->rect.y,
|
||||||
|
@ -512,6 +512,7 @@ meta_ui_frame_attach_style (MetaUIFrame *frame)
|
|||||||
|
|
||||||
MetaUIFrame *
|
MetaUIFrame *
|
||||||
meta_frames_manage_window (MetaFrames *frames,
|
meta_frames_manage_window (MetaFrames *frames,
|
||||||
|
MetaWindow *meta_window,
|
||||||
Window xwindow,
|
Window xwindow,
|
||||||
GdkWindow *window)
|
GdkWindow *window)
|
||||||
{
|
{
|
||||||
@ -531,6 +532,7 @@ meta_frames_manage_window (MetaFrames *frames,
|
|||||||
/* Don't set event mask here, it's in frame.c */
|
/* Don't set event mask here, it's in frame.c */
|
||||||
|
|
||||||
frame->xwindow = xwindow;
|
frame->xwindow = xwindow;
|
||||||
|
frame->meta_window = meta_window;
|
||||||
frame->cache_layout = NULL;
|
frame->cache_layout = NULL;
|
||||||
frame->text_layout = NULL;
|
frame->text_layout = NULL;
|
||||||
frame->text_height = -1;
|
frame->text_height = -1;
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#include <meta/common.h>
|
#include <meta/common.h>
|
||||||
|
#include <meta/types.h>
|
||||||
#include "theme-private.h"
|
#include "theme-private.h"
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@ -73,6 +74,7 @@ typedef struct _MetaUIFrame MetaUIFrame;
|
|||||||
struct _MetaUIFrame
|
struct _MetaUIFrame
|
||||||
{
|
{
|
||||||
MetaFrames *frames;
|
MetaFrames *frames;
|
||||||
|
MetaWindow *meta_window;
|
||||||
Window xwindow;
|
Window xwindow;
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
MetaStyleInfo *style_info;
|
MetaStyleInfo *style_info;
|
||||||
@ -119,6 +121,7 @@ GType meta_frames_get_type (void) G_GNUC_CONST;
|
|||||||
MetaFrames *meta_frames_new (int screen_number);
|
MetaFrames *meta_frames_new (int screen_number);
|
||||||
|
|
||||||
MetaUIFrame * meta_frames_manage_window (MetaFrames *frames,
|
MetaUIFrame * meta_frames_manage_window (MetaFrames *frames,
|
||||||
|
MetaWindow *meta_window,
|
||||||
Window xwindow,
|
Window xwindow,
|
||||||
GdkWindow *window);
|
GdkWindow *window);
|
||||||
|
|
||||||
|
@ -326,6 +326,7 @@ set_background_none (Display *xdisplay,
|
|||||||
MetaUIFrame *
|
MetaUIFrame *
|
||||||
meta_ui_create_frame (MetaUI *ui,
|
meta_ui_create_frame (MetaUI *ui,
|
||||||
Display *xdisplay,
|
Display *xdisplay,
|
||||||
|
MetaWindow *meta_window,
|
||||||
Visual *xvisual,
|
Visual *xvisual,
|
||||||
gint x,
|
gint x,
|
||||||
gint y,
|
gint y,
|
||||||
@ -391,7 +392,7 @@ meta_ui_create_frame (MetaUI *ui,
|
|||||||
gdk_window_resize (window, width, height);
|
gdk_window_resize (window, width, height);
|
||||||
set_background_none (xdisplay, GDK_WINDOW_XID (window));
|
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
|
void
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
/* Don't include gtk.h or gdk.h here */
|
/* Don't include gtk.h or gdk.h here */
|
||||||
#include <meta/common.h>
|
#include <meta/common.h>
|
||||||
|
#include <meta/types.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
@ -52,6 +53,7 @@ void meta_ui_theme_get_frame_borders (MetaUI *ui,
|
|||||||
|
|
||||||
MetaUIFrame * meta_ui_create_frame (MetaUI *ui,
|
MetaUIFrame * meta_ui_create_frame (MetaUI *ui,
|
||||||
Display *xdisplay,
|
Display *xdisplay,
|
||||||
|
MetaWindow *meta_window,
|
||||||
Visual *xvisual,
|
Visual *xvisual,
|
||||||
gint x,
|
gint x,
|
||||||
gint y,
|
gint y,
|
||||||
|
Loading…
Reference in New Issue
Block a user