mirror of
https://github.com/brl/mutter.git
synced 2025-02-04 15:44:10 +00:00
frame: Put a MetaUIFrame* in our MetaFrame
This is a small start, but it lets us start to clean up this UI split mess.
This commit is contained in:
parent
c8432cc430
commit
2413e672c8
@ -85,7 +85,7 @@ meta_window_ensure_frame (MetaWindow *window)
|
|||||||
else
|
else
|
||||||
visual = NULL;
|
visual = NULL;
|
||||||
|
|
||||||
frame->xwindow = meta_ui_create_frame_window (window->screen->ui,
|
frame->ui_frame = meta_ui_create_frame (window->screen->ui,
|
||||||
window->display->xdisplay,
|
window->display->xdisplay,
|
||||||
visual,
|
visual,
|
||||||
frame->rect.x,
|
frame->rect.x,
|
||||||
@ -94,6 +94,8 @@ meta_window_ensure_frame (MetaWindow *window)
|
|||||||
frame->rect.height,
|
frame->rect.height,
|
||||||
frame->window->screen->number,
|
frame->window->screen->number,
|
||||||
&create_serial);
|
&create_serial);
|
||||||
|
frame->xwindow = frame->ui_frame->xwindow;
|
||||||
|
|
||||||
meta_stack_tracker_record_add (window->screen->stack_tracker,
|
meta_stack_tracker_record_add (window->screen->stack_tracker,
|
||||||
frame->xwindow,
|
frame->xwindow,
|
||||||
create_serial);
|
create_serial);
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
#include "window-private.h"
|
#include "window-private.h"
|
||||||
|
|
||||||
|
#include "ui/frames.h"
|
||||||
|
|
||||||
struct _MetaFrame
|
struct _MetaFrame
|
||||||
{
|
{
|
||||||
/* window we frame */
|
/* window we frame */
|
||||||
@ -50,6 +52,8 @@ struct _MetaFrame
|
|||||||
guint need_reapply_frame_shape : 1;
|
guint need_reapply_frame_shape : 1;
|
||||||
guint is_flashing : 1; /* used by the visual bell flash */
|
guint is_flashing : 1; /* used by the visual bell flash */
|
||||||
guint borders_cached : 1;
|
guint borders_cached : 1;
|
||||||
|
|
||||||
|
MetaUIFrame *ui_frame;
|
||||||
};
|
};
|
||||||
|
|
||||||
void meta_window_ensure_frame (MetaWindow *window);
|
void meta_window_ensure_frame (MetaWindow *window);
|
||||||
|
@ -512,7 +512,7 @@ meta_frames_attach_style (MetaUIFrame *frame)
|
|||||||
variant));
|
variant));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
MetaUIFrame *
|
||||||
meta_frames_manage_window (MetaFrames *frames,
|
meta_frames_manage_window (MetaFrames *frames,
|
||||||
Window xwindow,
|
Window xwindow,
|
||||||
GdkWindow *window)
|
GdkWindow *window)
|
||||||
@ -544,6 +544,8 @@ meta_frames_manage_window (MetaFrames *frames,
|
|||||||
meta_core_grab_buttons (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow);
|
meta_core_grab_buttons (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow);
|
||||||
|
|
||||||
g_hash_table_replace (frames->frames, &frame->xwindow, frame);
|
g_hash_table_replace (frames->frames, &frame->xwindow, frame);
|
||||||
|
|
||||||
|
return frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -120,7 +120,7 @@ GType meta_frames_get_type (void) G_GNUC_CONST;
|
|||||||
|
|
||||||
MetaFrames *meta_frames_new (int screen_number);
|
MetaFrames *meta_frames_new (int screen_number);
|
||||||
|
|
||||||
void meta_frames_manage_window (MetaFrames *frames,
|
MetaUIFrame * meta_frames_manage_window (MetaFrames *frames,
|
||||||
Window xwindow,
|
Window xwindow,
|
||||||
GdkWindow *window);
|
GdkWindow *window);
|
||||||
void meta_frames_unmanage_window (MetaFrames *frames,
|
void meta_frames_unmanage_window (MetaFrames *frames,
|
||||||
|
@ -342,8 +342,8 @@ set_background_none (Display *xdisplay,
|
|||||||
CWBackPixmap, &attrs);
|
CWBackPixmap, &attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
Window
|
MetaUIFrame *
|
||||||
meta_ui_create_frame_window (MetaUI *ui,
|
meta_ui_create_frame (MetaUI *ui,
|
||||||
Display *xdisplay,
|
Display *xdisplay,
|
||||||
Visual *xvisual,
|
Visual *xvisual,
|
||||||
gint x,
|
gint x,
|
||||||
@ -410,9 +410,7 @@ meta_ui_create_frame_window (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));
|
||||||
|
|
||||||
meta_frames_manage_window (ui->frames, GDK_WINDOW_XID (window), window);
|
return meta_frames_manage_window (ui->frames, GDK_WINDOW_XID (window), window);
|
||||||
|
|
||||||
return GDK_WINDOW_XID (window);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
|
|
||||||
typedef struct _MetaUI MetaUI;
|
typedef struct _MetaUI MetaUI;
|
||||||
|
typedef struct _MetaUIFrame MetaUIFrame;
|
||||||
|
|
||||||
typedef gboolean (* MetaEventFunc) (XEvent *xevent, gpointer data);
|
typedef gboolean (* MetaEventFunc) (XEvent *xevent, gpointer data);
|
||||||
|
|
||||||
@ -58,7 +59,7 @@ void meta_ui_get_frame_mask (MetaUI *ui,
|
|||||||
guint height,
|
guint height,
|
||||||
cairo_t *cr);
|
cairo_t *cr);
|
||||||
|
|
||||||
Window meta_ui_create_frame_window (MetaUI *ui,
|
MetaUIFrame * meta_ui_create_frame (MetaUI *ui,
|
||||||
Display *xdisplay,
|
Display *xdisplay,
|
||||||
Visual *xvisual,
|
Visual *xvisual,
|
||||||
gint x,
|
gint x,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user