blob: fb318c17e3d244fd269727e4ea1b0d1c3e293353 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#pragma once
#include "../defines.hpp"
#include <deque>
#include "WLClasses.hpp"
#include <list>
#include <array>
struct SMonitor {
Vector2D vecPosition = Vector2D(0,0);
Vector2D vecSize = Vector2D(0,0);
bool primary = false;
uint64_t ID = -1;
int activeWorkspace = -1;
float scale = 1;
std::string szName = "";
Vector2D vecReservedTopLeft = Vector2D(0,0);
Vector2D vecReservedBottomRight = Vector2D(0,0);
// WLR stuff
wlr_output* output = nullptr;
float refreshRate = 60;
wlr_output_damage* damage = nullptr;
// Double-linked list because we need to have constant mem addresses for signals
// We have to store pointers and use raw new/delete because they might be moved between them
// and I am lazy
std::array<std::list<SLayerSurface*>, 4> m_aLayerSurfaceLists;
DYNLISTENER(monitorFrame);
DYNLISTENER(monitorDestroy);
// hack: a group = workspaces on a monitor.
// I don't really care lol :P
wlr_ext_workspace_group_handle_v1* pWLRWorkspaceGroupHandle = nullptr;
// For the list lookup
bool operator==(const SMonitor& rhs) {
return vecPosition == rhs.vecPosition && vecSize == rhs.vecSize && szName == rhs.szName;
}
};
|