fix workspace interactivity
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <glibmm.h>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <sigc++/sigc++.h>
|
||||
#include <string>
|
||||
@@ -43,7 +42,7 @@ class HyprlandService {
|
||||
void printMonitor(const Monitor &mon) const;
|
||||
|
||||
sigc::signal<void(std::string, std::string)> socketEventSignal;
|
||||
sigc::signal<void(int)> workspaceStateChanged;
|
||||
sigc::signal<void()> workspaceStateChanged;
|
||||
sigc::signal<void()> monitorStateChanged;
|
||||
|
||||
Monitor *getMonitorById(int id);
|
||||
@@ -52,14 +51,14 @@ class HyprlandService {
|
||||
const Monitor *getMonitorByIndex(std::size_t index) const;
|
||||
void switchToWorkspace(int workspaceId);
|
||||
|
||||
std::map<int, WorkspaceState> getAllWorkspaces() const {
|
||||
std::map<int, WorkspaceState*> getAllWorkspaces() const {
|
||||
return this->workspaces;
|
||||
}
|
||||
|
||||
private:
|
||||
int fd = -1;
|
||||
std::map<int, Monitor> monitors;
|
||||
std::map<int, WorkspaceState> workspaces;
|
||||
std::map<int, WorkspaceState*> workspaces;
|
||||
|
||||
std::string get_socket_path();
|
||||
bool on_socket_read(Glib::IOCondition condition);
|
||||
|
||||
@@ -16,9 +16,10 @@ class WorkspaceIndicator : public Gtk::Box {
|
||||
int monitorId;
|
||||
sigc::connection workspaceConnection;
|
||||
sigc::connection monitorConnection;
|
||||
std::map<int, Gtk::Label *> workspaceLabels;
|
||||
|
||||
void rebuild();
|
||||
void on_workspace_update(int monitorId);
|
||||
void on_workspace_update();
|
||||
void on_monitor_update();
|
||||
void clear_children();
|
||||
void refreshLabel(Gtk::Label *label, HyprlandService::WorkspaceState state);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user