]> git.mdlowis.com Git - proto/labwc.git/commitdiff
desktop: remove deprecated functions
authorJohan Malm <jgm323@gmail.com>
Sat, 16 Oct 2021 18:53:00 +0000 (19:53 +0100)
committerJohan Malm <jgm323@gmail.com>
Sat, 16 Oct 2021 18:53:00 +0000 (19:53 +0100)
- set_activated()
- desktop_set_focus_view_only()

include/labwc.h
src/cursor.c
src/desktop.c

index 27185df2b481d0c42a79d5cdd107f663413fab13..80d5e73d25ee0c0a439428a796b45a6c03bdd1fd 100644 (file)
@@ -353,7 +353,6 @@ void foreign_toplevel_handle_create(struct view *view);
  *              or pointer focus, in this compositor are they called together.
  */
 
-void desktop_set_focus_view_only(struct seat *seat, struct view *view);
 void desktop_raise_view(struct view *view);
 void desktop_focus_and_activate_view(struct seat *seat, struct view *view);
 
index b5dba5c87e926dc45d99861b679968fca8cce9b7..cea92cfd74526f74e5fc8381538b473916160b6b 100644 (file)
@@ -181,11 +181,9 @@ process_cursor_motion(struct server *server, uint32_t time)
 
 
        if (view && rc.focus_follow_mouse) {
+               desktop_focus_and_activate_view(&server->seat, view);
                if (rc.raise_on_focus) {
-                       desktop_focus_and_activate_view(&server->seat, view);
                        desktop_raise_view(view);
-               } else {
-                       desktop_set_focus_view_only(&server->seat, view);
                }
        }
 
index 482949aa3dbaa169ae7bc7114981ce496d3b02c3..b616acf5c081069adc9d64f8f80e5e0d8f575d9a 100644 (file)
@@ -51,49 +51,6 @@ move_xwayland_sub_views_to_front(struct view *parent)
 }
 #endif
 
-/* Activate/deactivate toplevel surface */
-static void
-set_activated(struct wlr_surface *surface, bool activated)
-{
-       if (!surface) {
-               return;
-       }
-       if (wlr_surface_is_xdg_surface(surface)) {
-               struct wlr_xdg_surface *s;
-               s = wlr_xdg_surface_from_wlr_surface(surface);
-               wlr_xdg_toplevel_set_activated(s, activated);
-#if HAVE_XWAYLAND
-       } else if (wlr_surface_is_xwayland_surface(surface)) {
-               struct wlr_xwayland_surface *s;
-               s = wlr_xwayland_surface_from_wlr_surface(surface);
-               wlr_xwayland_surface_activate(s, activated);
-#endif
-       }
-}
-
-void
-desktop_set_focus_view_only(struct seat *seat, struct view *view)
-{
-       if (!view || view->minimized || !view->mapped) {
-               return;
-       }
-       if (input_inhibit_blocks_surface(seat, view->surface->resource)) {
-               return;
-       }
-
-       struct wlr_surface *prev_surface;
-       prev_surface = seat->seat->keyboard_state.focused_surface;
-       if (prev_surface == view->surface) {
-               /* Don't re-focus an already focused surface. */
-               return;
-       }
-       if (prev_surface) {
-               set_activated(prev_surface, false);
-       }
-       set_activated(view->surface, true);
-       seat_focus_surface(seat, view->surface);
-}
-
 void
 desktop_raise_view(struct view *view)
 {