Skip to content

Commit d827386

Browse files
Merge branch 'main' into lenemter/cleanup-wayland-sockets
2 parents 3ab2ec2 + 5914298 commit d827386

24 files changed

+105
-60
lines changed

daemon-gtk3/DBus.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ public class Gala.Daemon.DBus : GLib.Object {
9090
menu.attach_to_widget (window.content, null);
9191

9292
Gdk.Rectangle rect = {
93-
x,
94-
y,
93+
x / window.scale_factor,
94+
y / window.scale_factor,
9595
0,
9696
0
9797
};

data/shaders/colorblindness-correction.vert

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,16 @@
88
uniform sampler2D tex;
99
uniform int COLORBLIND_MODE;
1010
uniform float STRENGTH;
11+
uniform bool PAUSE_FOR_SCREENSHOT;
12+
1113
void main() {
1214
vec4 c = texture2D(tex, cogl_tex_coord0_in.xy);
1315

16+
if (PAUSE_FOR_SCREENSHOT) {
17+
cogl_color_out = c;
18+
return;
19+
}
20+
1421
// RGB to LMS matrix
1522
float L = (17.8824f * c.r) + (43.5161f * c.g) + (4.11935f * c.b);
1623
float M = (3.45565f * c.r) + (27.1554f * c.g) + (3.86714f * c.b);

data/shaders/monochrome.vert

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@
55

66
uniform sampler2D tex;
77
uniform float STRENGTH;
8+
uniform bool PAUSE_FOR_SCREENSHOT;
9+
810
void main() {
9-
vec2 uv = cogl_tex_coord0_in.xy;
10-
vec4 sample = texture2D (tex, uv);
11+
vec4 sample = texture2D (tex, cogl_tex_coord0_in.xy);
12+
13+
if (PAUSE_FOR_SCREENSHOT) {
14+
cogl_color_out = sample;
15+
return;
16+
}
17+
1118
vec3 luminance = vec3 (0.2126, 0.7512, 0.0722);
1219
float gray = luminance.r * sample.r + luminance.g * sample.g + luminance.b * sample.b;
1320
cogl_color_out = vec4 (

lib/Constants.vala

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,6 @@ namespace Gala {
3535
NUDGE = 360,
3636
}
3737

38-
public enum GestureAction {
39-
NONE,
40-
SWITCH_WORKSPACE,
41-
SWITCH_WINDOWS,
42-
MULTITASKING_VIEW,
43-
DOCK,
44-
ZOOM,
45-
CLOSE_WINDOW,
46-
N_ACTIONS
47-
}
48-
4938
/**
5039
* Used as a key for Object.set_data<bool> on Meta.Windows that should be
5140
* treated as notifications. Has to be set before the window is mapped.
File renamed without changes.

src/Gestures/Gesture.vala renamed to lib/Gestures/Gesture.vala

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Gala {
2020
/**
2121
* Physical direction of the gesture. This direction doesn't follow natural scroll preferences.
2222
*/
23-
public enum GestureDirection {
23+
private enum GestureDirection {
2424
UNKNOWN = 0,
2525

2626
// GestureType.SWIPE and GestureType.SCROLL
@@ -34,7 +34,18 @@ namespace Gala {
3434
OUT = 6,
3535
}
3636

37-
public class Gesture {
37+
public enum GestureAction {
38+
NONE,
39+
SWITCH_WORKSPACE,
40+
SWITCH_WINDOWS,
41+
MULTITASKING_VIEW,
42+
DOCK,
43+
ZOOM,
44+
CLOSE_WINDOW,
45+
N_ACTIONS
46+
}
47+
48+
private class Gesture {
3849
public const float INVALID_COORD = float.MAX;
3950

4051
public Clutter.EventType type;

src/Gestures/GestureBackend.vala renamed to lib/Gestures/GestureBackend.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Authored by: Leonhard Kargl <[email protected]>
66
*/
77

8-
public interface Gala.GestureBackend : Object {
8+
private interface Gala.GestureBackend : Object {
99
public signal bool on_gesture_detected (Gesture gesture, uint32 timestamp);
1010
public signal void on_begin (double delta, uint64 time);
1111
public signal void on_update (double delta, uint64 time);

src/Gestures/GestureController.vala renamed to lib/Gestures/GestureController.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* You shouldn't connect a notify to the progress directly though, but rather use a
1414
* {@link GestureTarget} implementation.
1515
* The {@link progress} can be seen as representing the state that the UI the gesture affects
16-
* is currently in (e.g. 0 for multitasking view closed, 1 for it opend, or 0 for first workspace,
16+
* is currently in (e.g. 0 for multitasking view closed, 1 for it opened, or 0 for first workspace,
1717
* -1 for second, -2 for third, etc.). Therefore the progress often needs boundaries which can be
1818
* set with {@link overshoot_lower_clamp} and {@link overshoot_upper_clamp}. If the values are integers
1919
* it will be a hard boundary, if they are fractional it will slow the gesture progress when over the

src/Gestures/GestureSettings.vala renamed to lib/Gestures/GestureSettings.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/**
2020
* Utility class to access the gesture settings. Easily accessible through GestureTracker.settings.
2121
*/
22-
public class Gala.GestureSettings : Object {
22+
private class Gala.GestureSettings : Object {
2323
private static GLib.Settings gala_settings;
2424
private static GLib.Settings touchpad_settings;
2525

File renamed without changes.

0 commit comments

Comments
 (0)