Advertisement
Guest User

i3-prevent-stealing

a guest
Aug 27th, 2013
816
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.42 KB | None | 0 0
  1. diff --git a/src/handlers.c b/src/handlers.c
  2. index 36c8339..73eeb72 100644
  3. --- a/src/handlers.c
  4. +++ b/src/handlers.c
  5. @@ -657,6 +657,10 @@ static void handle_client_message(xcb_client_message_event_t *e
  6.          tree_render();
  7.      } else if (event->type == A__NET_ACTIVE_WINDOW) {
  8.          DLOG("_NET_ACTIVE_WINDOW: Window 0x%08x should be activated\n", event->wind
  9. +
  10. +        DLOG("_NET_ACTIVE_WINDOW: CHECK: ignoring\n");
  11. +        return;
  12. +
  13.          Con *con = con_by_window_id(event->window);
  14.          if (con == NULL) {
  15.              DLOG("Could not get window for client message\n");
  16. diff --git a/src/manage.c b/src/manage.c
  17. index f5bd76e..47f690f 100644
  18. --- a/src/manage.c
  19. +++ b/src/manage.c
  20. @@ -335,9 +335,11 @@ void manage_window(xcb_window_t window, xcb_get_window_attribut
  21.              Con *current_output = con_get_output(focused);
  22.              Con *target_output = con_get_output(ws);
  23.  
  24. +            DLOG("CHECK: something\n");
  25.              if (workspace_is_visible(ws) && current_output == target_output) {
  26.                  if (!match || !match->restart_mode) {
  27. -                    con_focus(nc);
  28. +                    DLOG("CHECK: preventing focus steal, not focusing\n");
  29. +                    // con_focus(nc);
  30.                  } else DLOG("not focusing, matched with restart_mode == true\n");
  31.              } else DLOG("workspace not visible, not focusing\n");
  32.          } else DLOG("dock, not focusing\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement