~mc-return/compiz/compiz.merge-fix1039406-benchmark-default-placement

« back to all changes in this revision

Viewing changes to gtk/window-decorator/gwd-cairo-window-decoration-util.c

Tags: v0.9.8.2
Fixes some issues that were picked up in bug #1042323

1) BUILD_METACITY=OFF not working
2) Various runtime errors using the cairo mode
3) Fixes broken borders when switching from metacity to cairo mode

Fixes (LP: #1042323). Fixes: https://bugs.launchpad.net/bugs/1042323. Approved by Sam Spilsbury.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2012 Canonical Ltd
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software Foundation,
 
16
 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
 *
 
18
 * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
 
19
 */
 
20
#include <decoration.h>
 
21
#include "gwd-cairo-window-decoration-util.h"
 
22
 
 
23
static const decor_extents_t gwd_cairo_window_decoration_default_win_extents =
 
24
{
 
25
    6, 6, 10, 6
 
26
};
 
27
 
 
28
static const decor_extents_t gwd_cairo_window_decoration_default_max_win_extents =
 
29
{
 
30
    6, 6, 4, 6
 
31
};
 
32
 
 
33
const decor_extents_t *
 
34
gwd_cairo_window_decoration_get_default_max_win_extents ()
 
35
{
 
36
    return &gwd_cairo_window_decoration_default_max_win_extents;
 
37
}
 
38
 
 
39
 
 
40
const decor_extents_t *
 
41
gwd_cairo_window_decoration_get_default_win_extents ()
 
42
{
 
43
    return &gwd_cairo_window_decoration_default_win_extents;
 
44
}
 
45
 
 
46
void
 
47
gwd_cairo_window_decoration_get_extents (decor_extents_t *win_extents,
 
48
                                         decor_extents_t *max_win_extents)
 
49
{
 
50
    memcpy (win_extents,
 
51
            gwd_cairo_window_decoration_get_default_max_win_extents (),
 
52
            sizeof (decor_extents_t));
 
53
    memcpy (max_win_extents,
 
54
            gwd_cairo_window_decoration_get_default_win_extents (),
 
55
            sizeof (decor_extents_t));
 
56
}