use hyprland command socket instead of spawning a hyprctl process
This commit is contained in:
@@ -17,14 +17,29 @@ class BaseNotification : public Gtk::Window {
|
||||
void resumeAutoClose();
|
||||
void startAutoClose(int timeoutMs);
|
||||
|
||||
sigc::signal<void(uint64_t)> signal_close;
|
||||
sigc::signal<void(bool)> signal_hover_changed;
|
||||
|
||||
uint64_t getNotificationId() const {
|
||||
return this->notificationId;
|
||||
}
|
||||
|
||||
sigc::signal<void(uint64_t)> getSignalClose() {
|
||||
return this->signalClose;
|
||||
}
|
||||
|
||||
sigc::signal<void(bool)> getSignalHoverChanged() {
|
||||
return this->signalHoverChanged;
|
||||
}
|
||||
|
||||
private:
|
||||
sigc::signal<void(uint64_t)> signalClose;
|
||||
sigc::signal<void(bool)> signalHoverChanged;
|
||||
|
||||
uint64_t notificationId;
|
||||
|
||||
bool autoClosePaused = false;
|
||||
int autoCloseRemainingMs = 0;
|
||||
std::chrono::steady_clock::time_point autoCloseDeadline;
|
||||
sigc::connection autoCloseConnection;
|
||||
|
||||
void ensure_notification_css_loaded();
|
||||
|
||||
void start_auto_close_timeout(int timeoutMs);
|
||||
@@ -32,10 +47,15 @@ class BaseNotification : public Gtk::Window {
|
||||
void resume_auto_close();
|
||||
|
||||
protected:
|
||||
uint64_t notificationId;
|
||||
bool getAutoClosePaused() const {
|
||||
return this->autoClosePaused;
|
||||
}
|
||||
|
||||
bool autoClosePaused = false;
|
||||
int autoCloseRemainingMs = 0;
|
||||
std::chrono::steady_clock::time_point autoCloseDeadline;
|
||||
sigc::connection autoCloseConnection;
|
||||
int getAutoCloseRemainingMs() const {
|
||||
return this->autoCloseRemainingMs;
|
||||
}
|
||||
|
||||
std::chrono::steady_clock::time_point getAutoCloseDeadline() const {
|
||||
return this->autoCloseDeadline;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user