[metacity/cowbell] Actually renders now. Next we need to calculate window geom correctly.
- From: Thomas James Alexander Thurman <tthurman src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [metacity/cowbell] Actually renders now. Next we need to calculate window geom correctly.
- Date: Mon, 19 Oct 2009 14:50:48 +0000 (UTC)
commit 48c7ae484c15e917bb415541ecd71c0156f7d048
Author: Thomas Thurman <tthurman gnome org>
Date: Sun Oct 18 01:05:35 2009 -0400
Actually renders now. Next we need to calculate window geom correctly.
src/ui/frames.c | 14 +++++++++++---
src/ui/theme.c | 27 +++++++++++++++------------
2 files changed, 26 insertions(+), 15 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 741aa02..5021d81 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2084,9 +2084,15 @@ generate_pixmap (MetaFrames *frames,
region = gdk_region_rectangle (&rectangle);
+ g_warning ("Generate pixmap (FIXME: PUT THIS BACK IN)\n");
+ /*
+
+ FIXME:
+ Temporarily commented out
+
meta_frames_paint_to_drawable (frames, frame, result, region,
-rectangle.x, -rectangle.y);
-
+ */
gdk_region_destroy (region);
return result;
@@ -2273,7 +2279,8 @@ meta_frames_expose_event (GtkWidget *widget,
pixels = get_cache (frames, frame);
cached_pixels_draw (pixels, frame->window, region);
-
+
+ g_warning ("Expose event\n");
clip_to_screen (region, frame);
meta_frames_paint_to_drawable (frames, frame, frame->window, region, 0, 0);
@@ -2417,7 +2424,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
meta_prefs_get_button_layout (&button_layout);
- if (G_LIKELY (GDK_IS_WINDOW (drawable)))
+ if (0) /* G_LIKELY (GDK_IS_WINDOW (drawable))) */
{
/* A window; happens about 2/3 of the time */
@@ -2502,6 +2509,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
{
/* Not a window; happens about 1/3 of the time */
+ g_warning("Painting\n");
meta_theme_draw_frame_with_style (meta_theme_get_current (),
frame->style,
widget,
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 4aced27..3e84ed0 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -14,6 +14,9 @@ struct _MetaTheme {
MetaTheme *the_theme = NULL;
+/* temporarily: */
+#define SILLY_BORDER_SIZE 20
+
/****************************************************************/
/* Our little hierarchy */
@@ -482,8 +485,8 @@ meta_theme_draw_frame_with_style (MetaTheme *theme,
int x = 0;
int y = 0;
- int w = client_width;
- int h = client_height;
+ int w = client_width + SILLY_BORDER_SIZE * 2;
+ int h = client_height + SILLY_BORDER_SIZE * 2;
PangoRectangle text_extents;
@@ -579,10 +582,10 @@ meta_theme_get_frame_borders (MetaTheme *theme,
int *right_width)
{
/* stub */
- *top_height = 20;
- *bottom_height = 20;
- *left_width = 20;
- *right_width = 20;
+ *top_height = SILLY_BORDER_SIZE;
+ *bottom_height = SILLY_BORDER_SIZE;
+ *left_width = SILLY_BORDER_SIZE;
+ *right_width = SILLY_BORDER_SIZE;
}
#define MAX_MIDDLE_BACKGROUNDS (MAX_BUTTONS_PER_CORNER - 2)
@@ -592,8 +595,8 @@ clear_rect(GdkRectangle *r)
{
r->x = 0;
r->y = 0;
- r->width = 20;
- r->height = 20;
+ r->width = SILLY_BORDER_SIZE;
+ r->height = SILLY_BORDER_SIZE;
}
static void
@@ -616,10 +619,10 @@ meta_theme_calc_geometry (MetaTheme *theme,
int i;
/* stub */
- fgeom->left_width = 20;
- fgeom->right_width = 20;
- fgeom->top_height = 20;
- fgeom->bottom_height = 20;
+ fgeom->left_width = SILLY_BORDER_SIZE;
+ fgeom->right_width = SILLY_BORDER_SIZE;
+ fgeom->top_height = SILLY_BORDER_SIZE;
+ fgeom->bottom_height = SILLY_BORDER_SIZE;
fgeom->width = 40+client_width;
fgeom->height = 40+client_height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]