mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 03:46:00 +01:00
session: add vt switching
This commit is contained in:
parent
917d48153a
commit
3e2fe425e4
2 changed files with 6 additions and 2 deletions
|
@ -21,7 +21,7 @@ namespace Aquamarine {
|
||||||
|
|
||||||
static Hyprutils::Memory::CSharedPointer<CSessionDevice> openIfKMS(Hyprutils::Memory::CSharedPointer<CSession> session_, const std::string& path_);
|
static Hyprutils::Memory::CSharedPointer<CSessionDevice> openIfKMS(Hyprutils::Memory::CSharedPointer<CSession> session_, const std::string& path_);
|
||||||
|
|
||||||
bool supportsKMS();
|
bool supportsKMS();
|
||||||
|
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int deviceID = -1;
|
int deviceID = -1;
|
||||||
|
@ -67,8 +67,8 @@ namespace Aquamarine {
|
||||||
libseat* libseatHandle = nullptr;
|
libseat* libseatHandle = nullptr;
|
||||||
|
|
||||||
std::vector<int> pollFDs();
|
std::vector<int> pollFDs();
|
||||||
|
|
||||||
void dispatchPendingEventsAsync();
|
void dispatchPendingEventsAsync();
|
||||||
|
bool switchVT(uint32_t vt);
|
||||||
|
|
||||||
struct SAddDrmCardEvent {
|
struct SAddDrmCardEvent {
|
||||||
std::string path;
|
std::string path;
|
||||||
|
|
|
@ -256,3 +256,7 @@ std::vector<int> Aquamarine::CSession::pollFDs() {
|
||||||
|
|
||||||
return {libseat_get_fd(libseatHandle), udev_monitor_get_fd(udevMonitor)};
|
return {libseat_get_fd(libseatHandle), udev_monitor_get_fd(udevMonitor)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Aquamarine::CSession::switchVT(uint32_t vt) {
|
||||||
|
return libseat_switch_session(libseatHandle, vt) == 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue