summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Ouellette <bigbrosebas@gmail.com>2022-06-20 22:05:02 -0400
committerGitHub <noreply@github.com>2022-06-20 22:05:02 -0400
commitf7e9a27c0aad1888fb894bc23ebbb5056ca399d4 (patch)
treeaa81cfd47f89f53267c606a50d553fc8806e1d5d /src
parentdc849350597e9eaaa8badab46667dc06d802f650 (diff)
parentf5f531562bdd2e935017b5400bd3b4ae5f89b54b (diff)
Merge branch 'vaxerski:main' into main
Diffstat (limited to 'src')
-rw-r--r--src/debug/HyprCtl.cpp3
-rw-r--r--src/defines.hpp4
-rw-r--r--src/helpers/WLClasses.hpp4
-rw-r--r--src/includes.hpp106
-rw-r--r--src/meson.build25
-rw-r--r--src/wlrunstable/wlr_ext_workspace_v1.cpp2
6 files changed, 88 insertions, 56 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 83656e13..66a8128d 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -114,6 +114,9 @@ std::string versionRequest() {
#ifndef NDEBUG
result += "debug\n";
#endif
+#ifdef HYPRLAND_DEBUG
+ result += "debug\n";
+#endif
#ifdef NO_XWAYLAND
result += "no xwayland\n";
#endif
diff --git a/src/defines.hpp b/src/defines.hpp
index 18db3955..80750c23 100644
--- a/src/defines.hpp
+++ b/src/defines.hpp
@@ -7,10 +7,14 @@
#include "wlrunstable/wlr_ext_workspace_v1.hpp"
#ifndef NDEBUG
+#ifdef HYPRLAND_DEBUG
#define ISDEBUG true
#else
#define ISDEBUG false
#endif
+#else
+#define ISDEBUG false
+#endif
#define RIP(format, ... ) { fprintf(stderr, format "\n", ##__VA_ARGS__); exit(EXIT_FAILURE); }
diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp
index 534b0de6..2a2d3c93 100644
--- a/src/helpers/WLClasses.hpp
+++ b/src/helpers/WLClasses.hpp
@@ -2,7 +2,7 @@
#include "../events/Events.hpp"
#include "../defines.hpp"
-#include "../../wlr-layer-shell-unstable-v1-protocol.h"
+#include "wlr-layer-shell-unstable-v1-protocol.h"
#include "../Window.hpp"
#include "SubsurfaceTree.hpp"
#include "AnimatedVariable.hpp"
@@ -205,4 +205,4 @@ struct STabletPad {
bool operator==(const STabletPad& b) {
return wlrTabletPadV2 == b.wlrTabletPadV2;
}
-}; \ No newline at end of file
+};
diff --git a/src/includes.hpp b/src/includes.hpp
index 6793604b..3aca4331 100644
--- a/src/includes.hpp
+++ b/src/includes.hpp
@@ -34,60 +34,60 @@
#define static
extern "C" {
-#include "../wlroots/include/wlr/backend.h"
-#include "../wlroots/include/wlr/backend/libinput.h"
-#include "../wlroots/include/wlr/render/allocator.h"
-#include "../wlroots/include/wlr/render/wlr_renderer.h"
-#include "../wlroots/include/wlr/types/wlr_compositor.h"
-#include "../wlroots/include/wlr/types/wlr_cursor.h"
-#include "../wlroots/include/wlr/types/wlr_data_control_v1.h"
-#include "../wlroots/include/wlr/types/wlr_data_device.h"
-#include "../wlroots/include/wlr/types/wlr_export_dmabuf_v1.h"
-#include "../wlroots/include/wlr/types/wlr_linux_dmabuf_v1.h"
-#include "../wlroots/include/wlr/types/wlr_gamma_control_v1.h"
-#include "../wlroots/include/wlr/types/wlr_idle.h"
-#include "../wlroots/include/wlr/types/wlr_input_device.h"
-#include "../wlroots/include/wlr/types/wlr_keyboard.h"
-#include "../wlroots/include/wlr/types/wlr_layer_shell_v1.h"
-#include "../wlroots/include/wlr/types/wlr_matrix.h"
-#include "../wlroots/include/wlr/types/wlr_output.h"
-#include "../wlroots/include/wlr/types/wlr_output_layout.h"
-#include "../wlroots/include/wlr/types/wlr_output_management_v1.h"
-#include "../wlroots/include/wlr/types/wlr_pointer.h"
-#include "../wlroots/include/wlr/types/wlr_presentation_time.h"
-#include "../wlroots/include/wlr/types/wlr_primary_selection.h"
-#include "../wlroots/include/wlr/types/wlr_primary_selection_v1.h"
-#include "../wlroots/include/wlr/types/wlr_screencopy_v1.h"
-#include "../wlroots/include/wlr/types/wlr_seat.h"
-#include "../wlroots/include/wlr/types/wlr_server_decoration.h"
-#include "../wlroots/include/wlr/types/wlr_viewporter.h"
-#include "../wlroots/include/wlr/types/wlr_virtual_keyboard_v1.h"
-#include "../wlroots/include/wlr/types/wlr_xcursor_manager.h"
-#include "../wlroots/include/wlr/types/wlr_xdg_activation_v1.h"
-#include "../wlroots/include/wlr/types/wlr_xdg_decoration_v1.h"
-#include "../wlroots/include/wlr/types/wlr_xdg_output_v1.h"
-#include "../wlroots/include/wlr/types/wlr_xdg_shell.h"
-#include "../wlroots/include/wlr/types/wlr_subcompositor.h"
-#include "../wlroots/include/wlr/types/wlr_scene.h"
-#include "../wlroots/include/wlr/types/wlr_output_damage.h"
-#include "../wlroots/include/wlr/types/wlr_input_inhibitor.h"
-#include "../wlroots/include/wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h"
-#include "../wlroots/include/wlr/types/wlr_virtual_pointer_v1.h"
-#include "../wlroots/include/wlr/types/wlr_foreign_toplevel_management_v1.h"
-#include "../wlroots/include/wlr/util/log.h"
-#include "../wlroots/include/wlr/xwayland.h"
-#include "../wlroots/include/wlr/util/region.h"
-#include "../wlroots/include/wlr/types/wlr_tablet_pad.h"
-#include "../wlroots/include/wlr/types/wlr_tablet_tool.h"
-#include "../wlroots/include/wlr/types/wlr_tablet_v2.h"
+#include <wlr/backend.h>
+#include <wlr/backend/libinput.h>
+#include <wlr/render/allocator.h>
+#include <wlr/render/wlr_renderer.h>
+#include <wlr/types/wlr_compositor.h>
+#include <wlr/types/wlr_cursor.h>
+#include <wlr/types/wlr_data_control_v1.h>
+#include <wlr/types/wlr_data_device.h>
+#include <wlr/types/wlr_export_dmabuf_v1.h>
+#include <wlr/types/wlr_linux_dmabuf_v1.h>
+#include <wlr/types/wlr_gamma_control_v1.h>
+#include <wlr/types/wlr_idle.h>
+#include <wlr/types/wlr_input_device.h>
+#include <wlr/types/wlr_keyboard.h>
+#include <wlr/types/wlr_layer_shell_v1.h>
+#include <wlr/types/wlr_matrix.h>
+#include <wlr/types/wlr_output.h>
+#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_output_management_v1.h>
+#include <wlr/types/wlr_pointer.h>
+#include <wlr/types/wlr_presentation_time.h>
+#include <wlr/types/wlr_primary_selection.h>
+#include <wlr/types/wlr_primary_selection_v1.h>
+#include <wlr/types/wlr_screencopy_v1.h>
+#include <wlr/types/wlr_seat.h>
+#include <wlr/types/wlr_server_decoration.h>
+#include <wlr/types/wlr_viewporter.h>
+#include <wlr/types/wlr_virtual_keyboard_v1.h>
+#include <wlr/types/wlr_xcursor_manager.h>
+#include <wlr/types/wlr_xdg_activation_v1.h>
+#include <wlr/types/wlr_xdg_decoration_v1.h>
+#include <wlr/types/wlr_xdg_output_v1.h>
+#include <wlr/types/wlr_xdg_shell.h>
+#include <wlr/types/wlr_subcompositor.h>
+#include <wlr/types/wlr_scene.h>
+#include <wlr/types/wlr_output_damage.h>
+#include <wlr/types/wlr_input_inhibitor.h>
+#include <wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h>
+#include <wlr/types/wlr_virtual_pointer_v1.h>
+#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
+#include <wlr/util/log.h>
+#include <wlr/xwayland.h>
+#include <wlr/util/region.h>
+#include <wlr/types/wlr_tablet_pad.h>
+#include <wlr/types/wlr_tablet_tool.h>
+#include <wlr/types/wlr_tablet_v2.h>
#include <xkbcommon/xkbcommon.h>
#include <X11/Xproto.h>
-#include "../wlroots/include/wlr/render/egl.h"
-#include "../wlroots/include/wlr/render/gles2.h"
-#include "../wlroots/include/wlr/render/wlr_texture.h"
-#include "../wlroots/include/wlr/types/wlr_pointer_constraints_v1.h"
-#include "../wlroots/include/wlr/types/wlr_relative_pointer_v1.h"
-#include "../wlroots/include/wlr/interfaces/wlr_keyboard.h"
+#include <wlr/render/egl.h>
+#include <wlr/render/gles2.h>
+#include <wlr/render/wlr_texture.h>
+#include <wlr/types/wlr_pointer_constraints_v1.h>
+#include <wlr/types/wlr_relative_pointer_v1.h>
+#include <wlr/interfaces/wlr_keyboard.h>
}
#undef class
@@ -113,4 +113,4 @@ extern "C" {
#include "helpers/Vector2D.hpp"
-#include "../ext-workspace-unstable-v1-protocol.h" \ No newline at end of file
+#include "ext-workspace-unstable-v1-protocol.h"
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 00000000..5d64188f
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,25 @@
+globber = run_command('find', '-name', '*.cpp', check: true)
+src = globber.stdout().strip().split('\n')
+
+executable('Hyprland', src,
+ cpp_args: ['-DWLR_USE_UNSTABLE'],
+ dependencies: [
+ server_protos,
+ dependency('wayland-server'),
+ dependency('wayland-client'),
+ wlroots.get_variable('wlroots'),
+ dependency('cairo'),
+ dependency('pango'),
+ dependency('pangocairo'),
+ dependency('libdrm'),
+ dependency('egl'),
+ dependency('xkbcommon'),
+ dependency('libinput'),
+ xcb_dep,
+
+ dependency('pixman-1'),
+ dependency('GL'),
+ dependency('threads')
+ ],
+ install : true
+)
diff --git a/src/wlrunstable/wlr_ext_workspace_v1.cpp b/src/wlrunstable/wlr_ext_workspace_v1.cpp
index 4d6de7ae..50a43c7b 100644
--- a/src/wlrunstable/wlr_ext_workspace_v1.cpp
+++ b/src/wlrunstable/wlr_ext_workspace_v1.cpp
@@ -2,7 +2,7 @@
#include "../includes.hpp"
#include "../helpers/MiscFunctions.hpp"
-#include "../../ext-workspace-unstable-v1-protocol.h"
+#include "ext-workspace-unstable-v1-protocol.h"
#include <assert.h>
#include <string.h>