Skip to content

Commit f4e0bf1

Browse files
committed
gtk3-daemon: don't depend on libgala
Move the enums to a shared file so that we can only keep the common part apart.
1 parent d0e15b4 commit f4e0bf1

File tree

4 files changed

+54
-39
lines changed

4 files changed

+54
-39
lines changed

daemon-gtk3/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ hdy_dep = dependency('libhandy-1')
1313
executable(
1414
'gala-daemon-gtk3',
1515
gala_daemon_sources,
16+
gala_common_enums,
1617
config_header,
17-
dependencies: [gala_base_dep, gala_dep, granite6_dep, hdy_dep],
18+
dependencies: [granite6_dep, hdy_dep],
1819
install: true,
1920
)

lib/CommonEnums.vala

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* SPDX-License-Identifier: GPL-3.0-or-later
3+
* SPDX-FileCopyrightText: 2025 elementary, Inc. (https://elementary.io)
4+
* 2012-2014 Tom Beckmann, Rico Tzschichholz
5+
*
6+
* Note: These enums are shared with the daemon
7+
*/
8+
9+
namespace Gala {
10+
public enum ActionType {
11+
NONE = 0,
12+
SHOW_MULTITASKING_VIEW,
13+
MAXIMIZE_CURRENT,
14+
HIDE_CURRENT,
15+
OPEN_LAUNCHER,
16+
CUSTOM_COMMAND,
17+
WINDOW_OVERVIEW,
18+
WINDOW_OVERVIEW_ALL,
19+
SWITCH_TO_WORKSPACE_PREVIOUS,
20+
SWITCH_TO_WORKSPACE_NEXT,
21+
SWITCH_TO_WORKSPACE_LAST,
22+
START_MOVE_CURRENT,
23+
START_RESIZE_CURRENT,
24+
TOGGLE_ALWAYS_ON_TOP_CURRENT,
25+
TOGGLE_ALWAYS_ON_VISIBLE_WORKSPACE_CURRENT,
26+
MOVE_CURRENT_WORKSPACE_LEFT,
27+
MOVE_CURRENT_WORKSPACE_RIGHT,
28+
CLOSE_CURRENT,
29+
SCREENSHOT_CURRENT
30+
}
31+
32+
[Flags]
33+
public enum WindowFlags {
34+
NONE = 0,
35+
CAN_HIDE,
36+
CAN_MAXIMIZE,
37+
IS_MAXIMIZED,
38+
ALLOWS_MOVE,
39+
ALLOWS_RESIZE,
40+
ALWAYS_ON_TOP,
41+
ON_ALL_WORKSPACES,
42+
CAN_CLOSE,
43+
IS_TILED,
44+
ALLOWS_MOVE_LEFT,
45+
ALLOWS_MOVE_RIGHT
46+
}
47+
}

lib/WindowManager.vala

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,44 +23,6 @@ namespace Gala {
2323
public const string TOGGLE_RECORDING_ACTION = "toggle-recording-action";
2424
}
2525

26-
public enum ActionType {
27-
NONE = 0,
28-
SHOW_MULTITASKING_VIEW,
29-
MAXIMIZE_CURRENT,
30-
HIDE_CURRENT,
31-
OPEN_LAUNCHER,
32-
CUSTOM_COMMAND,
33-
WINDOW_OVERVIEW,
34-
WINDOW_OVERVIEW_ALL,
35-
SWITCH_TO_WORKSPACE_PREVIOUS,
36-
SWITCH_TO_WORKSPACE_NEXT,
37-
SWITCH_TO_WORKSPACE_LAST,
38-
START_MOVE_CURRENT,
39-
START_RESIZE_CURRENT,
40-
TOGGLE_ALWAYS_ON_TOP_CURRENT,
41-
TOGGLE_ALWAYS_ON_VISIBLE_WORKSPACE_CURRENT,
42-
MOVE_CURRENT_WORKSPACE_LEFT,
43-
MOVE_CURRENT_WORKSPACE_RIGHT,
44-
CLOSE_CURRENT,
45-
SCREENSHOT_CURRENT
46-
}
47-
48-
[Flags]
49-
public enum WindowFlags {
50-
NONE = 0,
51-
CAN_HIDE,
52-
CAN_MAXIMIZE,
53-
IS_MAXIMIZED,
54-
ALLOWS_MOVE,
55-
ALLOWS_RESIZE,
56-
ALWAYS_ON_TOP,
57-
ON_ALL_WORKSPACES,
58-
CAN_CLOSE,
59-
IS_TILED,
60-
ALLOWS_MOVE_LEFT,
61-
ALLOWS_MOVE_RIGHT
62-
}
63-
6426
/**
6527
* Function that should return true if the given shortcut should be blocked.
6628
*/

lib/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
gala_common_enums = files(
2+
'CommonEnums.vala',
3+
)
4+
15
gala_lib_sources = files(
26
'ActivatableComponent.vala',
37
'App.vala',
@@ -45,6 +49,7 @@ gala_resources = gnome.compile_resources(
4549
gala_lib = shared_library(
4650
'gala',
4751
gala_lib_sources,
52+
gala_common_enums,
4853
gala_resources,
4954
dependencies: [gala_base_dep],
5055
install: true,

0 commit comments

Comments
 (0)