diff options
author | vaxerski <[email protected]> | 2022-08-20 20:06:24 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-08-20 20:06:24 +0200 |
commit | cc3f0ff9e7906bff60a041fc5556e7c5cbd71df5 (patch) | |
tree | 7c95ae20b5155f08e56f7cc7ceb6fb25b4f2a182 | |
parent | 7af193d921dcc52e36b91a67a3433abdd5a994f7 (diff) | |
download | Hyprland-cc3f0ff9e7906bff60a041fc5556e7c5cbd71df5.tar.gz Hyprland-cc3f0ff9e7906bff60a041fc5556e7c5cbd71df5.zip |
update wlroots dep
-rw-r--r-- | src/Compositor.cpp | 2 | ||||
-rw-r--r-- | src/helpers/MiscFunctions.cpp | 29 | ||||
-rw-r--r-- | src/helpers/MiscFunctions.hpp | 1 | ||||
-rw-r--r-- | src/wlrunstable/wlr_ext_workspace_v1.cpp | 12 | ||||
m--------- | subprojects/wlroots | 0 |
5 files changed, 7 insertions, 37 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index bf549695..088440f1 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -718,7 +718,7 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) { .old_surface = m_pLastFocus, .new_surface = pSurface, }; - wlr_signal_emit_safe(&m_sSeat.seat->keyboard_state.events.focus_change, &event); + wl_signal_emit_mutable(&m_sSeat.seat->keyboard_state.events.focus_change, &event); if (pWindowOwner) Debug::log(LOG, "Set keyboard focus to surface %x, with window name: %s", pSurface, pWindowOwner->m_szTitle.c_str()); diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index b27489ca..405a53d8 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -75,35 +75,6 @@ void handleNoop(struct wl_listener *listener, void *data) { // Do nothing } -void wlr_signal_emit_safe(struct wl_signal *signal, void *data) { - struct wl_listener cursor; - struct wl_listener end; - - /* Add two special markers: one cursor and one end marker. This way, we know - * that we've already called listeners on the left of the cursor and that we - * don't want to call listeners on the right of the end marker. The 'it' - * function can remove any element it wants from the list without troubles. - * wl_list_for_each_safe tries to be safe but it fails: it works fine - * if the current item is removed, but not if the next one is. */ - wl_list_insert(&signal->listener_list, &cursor.link); - cursor.notify = handleNoop; - wl_list_insert(signal->listener_list.prev, &end.link); - end.notify = handleNoop; - - while (cursor.link.next != &end.link) { - struct wl_list *pos = cursor.link.next; - struct wl_listener *l = wl_container_of(pos, l, link); - - wl_list_remove(&cursor.link); - wl_list_insert(pos, &cursor.link); - - l->notify(l, data); - } - - wl_list_remove(&cursor.link); - wl_list_remove(&end.link); -} - std::string getFormat(const char *fmt, ...) { char* outputStr = nullptr; diff --git a/src/helpers/MiscFunctions.hpp b/src/helpers/MiscFunctions.hpp index 9f002c20..bbfb8ca2 100644 --- a/src/helpers/MiscFunctions.hpp +++ b/src/helpers/MiscFunctions.hpp @@ -4,7 +4,6 @@ std::string absolutePath(const std::string&, const std::string&); void addWLSignal(wl_signal*, wl_listener*, void* pOwner, std::string ownerString); -void wlr_signal_emit_safe(struct wl_signal *signal, void *data); std::string getFormat(const char *fmt, ...); // Basically Debug::log to a string std::string escapeJSONStrings(const std::string& str); void scaleBox(wlr_box*, float); diff --git a/src/wlrunstable/wlr_ext_workspace_v1.cpp b/src/wlrunstable/wlr_ext_workspace_v1.cpp index 50a43c7b..3a8cbfd3 100644 --- a/src/wlrunstable/wlr_ext_workspace_v1.cpp +++ b/src/wlrunstable/wlr_ext_workspace_v1.cpp @@ -112,7 +112,7 @@ static void workspace_handle_remove(struct wl_client *client, return; } - wlr_signal_emit_safe(&workspace->events.remove_request, NULL); + wl_signal_emit_mutable(&workspace->events.remove_request, NULL); } static void workspace_handle_deactivate(struct wl_client *client, @@ -312,7 +312,7 @@ void wlr_ext_workspace_handle_v1_destroy( return; } - wlr_signal_emit_safe(&workspace->events.destroy, workspace); + wl_signal_emit_mutable(&workspace->events.destroy, workspace); workspace_manager_update_idle_source(workspace->group->manager); @@ -338,7 +338,7 @@ static void workspace_group_handle_handle_create_workspace(struct wl_client *cli struct wlr_ext_workspace_group_handle_v1_create_workspace_event event; event.workspace_group = group; event.name = arg; - wlr_signal_emit_safe(&group->events.create_workspace_request, &event); + wl_signal_emit_mutable(&group->events.create_workspace_request, &event); } static void workspace_group_handle_handle_destroy(struct wl_client *client, @@ -513,7 +513,7 @@ void wlr_ext_workspace_group_handle_v1_destroy( wlr_ext_workspace_handle_v1_destroy(workspace); } - wlr_signal_emit_safe(&group->events.destroy, group); + wl_signal_emit_mutable(&group->events.destroy, group); workspace_manager_update_idle_source(group->manager); struct wlr_ext_workspace_group_handle_v1_output *output, *tmp2; @@ -556,7 +556,7 @@ static void workspace_manager_commit(struct wl_client *client, } } - wlr_signal_emit_safe(&manager->events.commit, manager); + wl_signal_emit_mutable(&manager->events.commit, manager); } static void workspace_manager_stop(struct wl_client *client, @@ -602,7 +602,7 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) { struct wlr_ext_workspace_manager_v1 *manager = wl_container_of(listener, manager, display_destroy); - wlr_signal_emit_safe(&manager->events.destroy, manager); + wl_signal_emit_mutable(&manager->events.destroy, manager); wl_list_remove(&manager->display_destroy.link); wl_global_destroy(manager->global); diff --git a/subprojects/wlroots b/subprojects/wlroots -Subproject 3baf2a6bcfc4cb86c364f5724aaec80f28715a0 +Subproject 7c575922c05e4d5fd9a403c2aa631a54c7531d4 |