2
2
// Copyright (C) 2012 Tom Beckmann, Rico Tzschichholz
4
4
// This program is free software: you can redistribute it and/or modify
5
5
// it under the terms of the GNU General Public License as published by
6
6
// the Free Software Foundation, either version 3 of the License, or
7
7
// (at your option) any later version.
9
9
// This program is distributed in the hope that it will be useful,
10
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
12
// GNU General Public License for more details.
14
14
// You should have received a copy of the GNU General Public License
15
15
// along with this program. If not, see <http://www.gnu.org/licenses/>.
31
31
var factory = ShadowFactory.get_default ();
32
32
var settings = ShadowSettings.get_default ();
33
33
Meta.ShadowParams shadow;
36
36
shadow = settings.get_shadowparams ("normal_focused");
37
37
factory.set_params ("normal", true, shadow);
40
40
shadow = settings.get_shadowparams ("normal_unfocused");
41
41
factory.set_params ("normal", false, shadow);
44
44
shadow = settings.get_shadowparams ("menu");
45
45
factory.set_params ("menu", false, shadow);
46
46
factory.set_params ("dropdown-menu", false, shadow);
47
47
factory.set_params ("popup-menu", false, shadow);
50
50
shadow = settings.get_shadowparams ("dialog_focused");
51
51
factory.set_params ("dialog", true, shadow);
52
52
factory.set_params ("modal_dialog", false, shadow);
55
55
shadow = settings.get_shadowparams ("normal_unfocused");
56
56
factory.set_params ("dialog", false, shadow);
57
57
factory.set_params ("modal_dialog", false, shadow);
61
61
* set the area where clutter can receive events
63
63
public static void set_input_area (Screen screen, InputArea area)
65
65
var display = screen.get_display ();
67
67
X.Xrectangle[] rects = {};
69
69
screen.get_size (out width, out height);
70
70
var geometry = screen.get_monitor_geometry (screen.get_primary_monitor ());
73
73
case InputArea.FULLSCREEN:
74
74
X.Xrectangle rect = {0, 0, (ushort)width, (ushort)height};
77
77
case InputArea.HOT_CORNER:
78
78
var schema = BehaviorSettings.get_default ().schema;
80
80
// if ActionType is NONE make it 0 sized
81
81
ushort tl_size = (schema.get_enum ("hotcorner-topleft") != ActionType.NONE ? 1 : 0);
82
82
ushort tr_size = (schema.get_enum ("hotcorner-topright") != ActionType.NONE ? 1 : 0);
83
83
ushort bl_size = (schema.get_enum ("hotcorner-bottomleft") != ActionType.NONE ? 1 : 0);
84
84
ushort br_size = (schema.get_enum ("hotcorner-bottomright") != ActionType.NONE ? 1 : 0);
86
86
X.Xrectangle topleft = {(short)geometry.x, (short)geometry.y, tl_size, tl_size};
87
87
X.Xrectangle topright = {(short)(geometry.x + geometry.width - 1), (short)geometry.y, tr_size, tr_size};
88
88
X.Xrectangle bottomleft = {(short)geometry.x, (short)(geometry.y + geometry.height - 1), bl_size, bl_size};
89
89
X.Xrectangle bottomright = {(short)(geometry.x + geometry.width - 1), (short)(geometry.y + geometry.height - 1), br_size, br_size};
91
91
rects = {topleft, topright, bottomleft, bottomright};
93
93
case InputArea.NONE: