use hyprland command socket instead of spawning a hyprctl process
This commit is contained in:
@@ -41,17 +41,17 @@ BaseNotification::BaseNotification(uint64_t notificationId, std::shared_ptr<Gdk:
|
||||
return;
|
||||
}
|
||||
}
|
||||
this->signal_close.emit(this->notificationId);
|
||||
this->getSignalClose().emit(this->notificationId);
|
||||
});
|
||||
add_controller(window_click);
|
||||
|
||||
auto window_motion = Gtk::EventControllerMotion::create();
|
||||
window_motion->signal_enter().connect([this](double, double) {
|
||||
signal_hover_changed.emit(true);
|
||||
getSignalHoverChanged().emit(true);
|
||||
pause_auto_close();
|
||||
});
|
||||
window_motion->signal_leave().connect([this]() {
|
||||
signal_hover_changed.emit(false);
|
||||
getSignalHoverChanged().emit(false);
|
||||
resume_auto_close();
|
||||
});
|
||||
add_controller(window_motion);
|
||||
@@ -82,7 +82,7 @@ void BaseNotification::start_auto_close_timeout(int timeoutMs) {
|
||||
|
||||
autoCloseDeadline = std::chrono::steady_clock::now() + std::chrono::milliseconds(timeoutMs);
|
||||
autoCloseConnection = Glib::signal_timeout().connect([this]() {
|
||||
this->signal_close.emit(this->notificationId);
|
||||
this->getSignalClose().emit(this->notificationId);
|
||||
return false; // Don't repeat
|
||||
},
|
||||
timeoutMs);
|
||||
@@ -110,7 +110,7 @@ void BaseNotification::resume_auto_close() {
|
||||
|
||||
autoClosePaused = false;
|
||||
if (autoCloseRemainingMs <= 0) {
|
||||
this->signal_close.emit(this->notificationId);
|
||||
this->getSignalClose().emit(this->notificationId);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user