diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/CMakeLists.txt | 27 | ||||
-rw-r--r-- | sway/debug_log.c | 103 | ||||
-rw-r--r-- | sway/desktop/output.c | 19 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 61 | ||||
-rw-r--r-- | sway/main.c | 48 | ||||
-rw-r--r-- | sway/old/border.c (renamed from sway/border.c) | 0 | ||||
-rw-r--r-- | sway/old/commands.c (renamed from sway/commands.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/assign.c (renamed from sway/commands/assign.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar.c (renamed from sway/commands/bar.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/activate_button.c (renamed from sway/commands/bar/activate_button.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/binding_mode_indicator.c (renamed from sway/commands/bar/binding_mode_indicator.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/bindsym.c (renamed from sway/commands/bar/bindsym.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/colors.c (renamed from sway/commands/bar/colors.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/context_button.c (renamed from sway/commands/bar/context_button.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/font.c (renamed from sway/commands/bar/font.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/height.c (renamed from sway/commands/bar/height.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/hidden_state.c (renamed from sway/commands/bar/hidden_state.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/icon_theme.c (renamed from sway/commands/bar/icon_theme.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/id.c (renamed from sway/commands/bar/id.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/mode.c (renamed from sway/commands/bar/mode.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/modifier.c (renamed from sway/commands/bar/modifier.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/output.c (renamed from sway/commands/bar/output.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/pango_markup.c (renamed from sway/commands/bar/pango_markup.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/position.c (renamed from sway/commands/bar/position.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/secondary_button.c (renamed from sway/commands/bar/secondary_button.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/separator_symbol.c (renamed from sway/commands/bar/separator_symbol.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/status_command.c (renamed from sway/commands/bar/status_command.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/strip_workspace_numbers.c (renamed from sway/commands/bar/strip_workspace_numbers.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/swaybar_command.c (renamed from sway/commands/bar/swaybar_command.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/tray_output.c (renamed from sway/commands/bar/tray_output.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/tray_padding.c (renamed from sway/commands/bar/tray_padding.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/workspace_buttons.c (renamed from sway/commands/bar/workspace_buttons.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bar/wrap_scroll.c (renamed from sway/commands/bar/wrap_scroll.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/bind.c (renamed from sway/commands/bind.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/border.c (renamed from sway/commands/border.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/client.c (renamed from sway/commands/client.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/clipboard.c (renamed from sway/commands/clipboard.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/commands.c (renamed from sway/commands/commands.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/debuglog.c (renamed from sway/commands/debuglog.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/default_border.c (renamed from sway/commands/default_border.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/default_floating_border.c (renamed from sway/commands/default_floating_border.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/exec.c (renamed from sway/commands/exec.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/exec_always.c (renamed from sway/commands/exec_always.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/exit.c (renamed from sway/commands/exit.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/floating.c (renamed from sway/commands/floating.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/floating_maximum_size.c (renamed from sway/commands/floating_maximum_size.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/floating_minimum_size.c (renamed from sway/commands/floating_minimum_size.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/floating_mod.c (renamed from sway/commands/floating_mod.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/floating_scroll.c (renamed from sway/commands/floating_scroll.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/focus.c (renamed from sway/commands/focus.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/focus_follows_mouse.c (renamed from sway/commands/focus_follows_mouse.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/font.c (renamed from sway/commands/font.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/for_window.c (renamed from sway/commands/for_window.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/force_focus_wrapping.c (renamed from sway/commands/force_focus_wrapping.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/fullscreen.c (renamed from sway/commands/fullscreen.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/gaps.c (renamed from sway/commands/gaps.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/hide_edge_borders.c (renamed from sway/commands/hide_edge_borders.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/include.c (renamed from sway/commands/include.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input.c (renamed from sway/commands/input.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input/accel_profile.c (renamed from sway/commands/input/accel_profile.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input/click_method.c (renamed from sway/commands/input/click_method.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input/drag_lock.c (renamed from sway/commands/input/drag_lock.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input/dwt.c (renamed from sway/commands/input/dwt.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input/events.c (renamed from sway/commands/input/events.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input/left_handed.c (renamed from sway/commands/input/left_handed.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input/middle_emulation.c (renamed from sway/commands/input/middle_emulation.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input/natural_scroll.c (renamed from sway/commands/input/natural_scroll.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input/pointer_accel.c (renamed from sway/commands/input/pointer_accel.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input/scroll_method.c (renamed from sway/commands/input/scroll_method.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/input/tap.c (renamed from sway/commands/input/tap.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/ipc.c (renamed from sway/commands/ipc.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/kill.c (renamed from sway/commands/kill.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/layout.c (renamed from sway/commands/layout.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/log_colors.c (renamed from sway/commands/log_colors.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/mark.c (renamed from sway/commands/mark.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/mode.c (renamed from sway/commands/mode.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/mouse_warping.c (renamed from sway/commands/mouse_warping.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/move.c (renamed from sway/commands/move.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/new_float.c (renamed from sway/commands/new_float.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/new_window.c (renamed from sway/commands/new_window.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/no_focus.c (renamed from sway/commands/no_focus.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/orientation.c (renamed from sway/commands/orientation.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/output.c (renamed from sway/commands/output.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/permit.c (renamed from sway/commands/permit.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/reload.c (renamed from sway/commands/reload.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/resize.c (renamed from sway/commands/resize.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/scratchpad.c (renamed from sway/commands/scratchpad.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/seamless_mouse.c (renamed from sway/commands/seamless_mouse.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/set.c (renamed from sway/commands/set.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/show_marks.c (renamed from sway/commands/show_marks.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/smart_gaps.c (renamed from sway/commands/smart_gaps.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/split.c (renamed from sway/commands/split.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/sticky.c (renamed from sway/commands/sticky.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/unmark.c (renamed from sway/commands/unmark.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/workspace.c (renamed from sway/commands/workspace.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/workspace_auto_back_and_forth.c (renamed from sway/commands/workspace_auto_back_and_forth.c) | 0 | ||||
-rw-r--r-- | sway/old/commands/workspace_layout.c (renamed from sway/commands/workspace_layout.c) | 0 | ||||
-rw-r--r-- | sway/old/config.c (renamed from sway/config.c) | 138 | ||||
-rw-r--r-- | sway/old/container.c (renamed from sway/tree/container.c) | 0 | ||||
-rw-r--r-- | sway/old/criteria.c (renamed from sway/tree/criteria.c) | 0 | ||||
-rw-r--r-- | sway/old/focus.c (renamed from sway/tree/focus.c) | 0 | ||||
-rw-r--r-- | sway/old/handlers.c (renamed from sway/handlers.c) | 0 | ||||
-rw-r--r-- | sway/old/input_state.c (renamed from sway/input_state.c) | 0 | ||||
-rw-r--r-- | sway/old/ipc-json.c (renamed from sway/ipc-json.c) | 0 | ||||
-rw-r--r-- | sway/old/ipc-server.c (renamed from sway/ipc-server.c) | 5 | ||||
-rw-r--r-- | sway/old/layout.c (renamed from sway/tree/layout.c) | 0 | ||||
-rw-r--r-- | sway/old/output.c (renamed from sway/tree/output.c) | 0 | ||||
-rw-r--r-- | sway/old/security.c (renamed from sway/security.c) | 0 | ||||
-rw-r--r-- | sway/old/workspace.c (renamed from sway/tree/workspace.c) | 0 | ||||
-rw-r--r-- | sway/server.c | 2 |
110 files changed, 27 insertions, 376 deletions
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt index f9209189..73531a84 100644 --- a/sway/CMakeLists.txt +++ b/sway/CMakeLists.txt @@ -1,6 +1,5 @@ include_directories( ${PROTOCOLS_INCLUDE_DIRS} - ${WLC_INCLUDE_DIRS} ${WLR_INCLUDE_DIRS} ${PCRE_INCLUDE_DIRS} ${JSONC_INCLUDE_DIRS} @@ -11,37 +10,12 @@ include_directories( ${WAYLAND_INCLUDE_DIR} ) -file(GLOB cmds - "commands/*.c" - "commands/bar/*.c" - "commands/input/*.c" -) - add_executable(sway desktop/output.c desktop/xdg_shell_v6.c - tree/container.c - tree/criteria.c - tree/focus.c - tree/output.c - tree/workspace.c - tree/layout.c - - input/input.c - - commands.c - ${cmds} - base64.c - config.c - debug_log.c - input_state.c - ipc-json.c - ipc-server.c main.c - border.c - security.c server.c ) @@ -53,7 +27,6 @@ target_link_libraries(sway sway-common sway-protocols sway-wayland - ${WLC_LIBRARIES} ${WLR_LIBRARIES} ${XKBCOMMON_LIBRARIES} ${PCRE_LIBRARIES} diff --git a/sway/debug_log.c b/sway/debug_log.c deleted file mode 100644 index d1eafae8..00000000 --- a/sway/debug_log.c +++ /dev/null @@ -1,103 +0,0 @@ -#include "log.h" -#include "sway.h" -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <libgen.h> -#include <fcntl.h> -#include <unistd.h> -#include <signal.h> -#include <errno.h> -#include <string.h> -#include <stringop.h> -#include "sway/workspace.h" - -/* XXX:DEBUG:XXX */ -static void container_log(const swayc_t *c, int depth) { - fprintf(stderr, "focus:%c", - c == get_focused_view(&root_container) ? 'K': - c == get_focused_container(&root_container) ? 'F' : // Focused - c == swayc_active_workspace() ? 'W' : // active workspace - c == &root_container ? 'R' : // root - 'X');// not any others - for (int i = 6; i > depth; i--) { fprintf(stderr, " "); } - fprintf(stderr,"|(%p)",c); - fprintf(stderr,"(p:%-8p)",c->parent); - fprintf(stderr,"(f:%-8p)",c->focused); - fprintf(stderr,"(h:%2" PRIuPTR ")",c->handle); - fprintf(stderr,"Type:%-4s|", - c->type == C_ROOT ? "root" : - c->type == C_OUTPUT ? "op" : - c->type == C_WORKSPACE ? "ws" : - c->type == C_CONTAINER ? "cont" : - c->type == C_VIEW ? "view" : "?"); - fprintf(stderr,"layout:%-5s|", - c->layout == L_NONE ? "-" : - c->layout == L_HORIZ ? "Horiz": - c->layout == L_VERT ? "Vert": - c->layout == L_STACKED ? "Stack": - c->layout == L_TABBED ? "Tab": - c->layout == L_FLOATING ? "Float": - c->layout == L_AUTO_LEFT ? "A_lft": - c->layout == L_AUTO_RIGHT ? "A_rgt": - c->layout == L_AUTO_TOP ? "A_top": - c->layout == L_AUTO_BOTTOM ? "A_bot": - "Unknown"); - fprintf(stderr, "w:%4.f|h:%4.f|", c->width, c->height); - fprintf(stderr, "x:%4.f|y:%4.f|", c->x, c->y); - fprintf(stderr, "g:%3d|",c->gaps); - fprintf(stderr, "vis:%c|", c->visible?'t':'f'); - fprintf(stderr, "children:%2d|",c->children?c->children->length:0); - fprintf(stderr, "name:%.16s\n", c->name); -} -void layout_log(const swayc_t *c, int depth) { - if (L_DEBUG > get_log_level()) return; - int i, d; - int e = c->children ? c->children->length : 0; - container_log(c, depth); - if (e) { - for (i = 0; i < e; ++i) { - fputc('|',stderr); - for (d = 0; d < depth; ++d) fputc('-', stderr); - layout_log(c->children->items[i], depth + 1); - } - } - if (c->type == C_WORKSPACE) { - e = c->floating?c->floating->length:0; - if (e) { - for (i = 0; i < e; ++i) { - fputc('|',stderr); - for (d = 0; d < depth; ++d) fputc('=', stderr); - layout_log(c->floating->items[i], depth + 1); - } - } - } -} - -const char *swayc_type_string(enum swayc_types type) { - return type == C_ROOT ? "ROOT" : - type == C_OUTPUT ? "OUTPUT" : - type == C_WORKSPACE ? "WORKSPACE" : - type == C_CONTAINER ? "CONTAINER" : - type == C_VIEW ? "VIEW" : - "UNKNOWN"; -} - -// Like sway_log, but also appends some info about given container to log output. -void swayc_log(log_importance_t verbosity, swayc_t *cont, const char* format, ...) { - sway_assert(cont, "swayc_log: no container ..."); - va_list args; - va_start(args, format); - char *txt = malloc(128); - vsprintf(txt, format, args); - va_end(args); - - char *debug_txt = malloc(32); - snprintf(debug_txt, 32, "%s '%s'", swayc_type_string(cont->type), cont->name); - - sway_log(verbosity, "%s (%s)", txt, debug_txt); - free(txt); - free(debug_txt); -} - -/* XXX:DEBUG:XXX */ diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 6d0bebc5..6ddcac3b 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -4,11 +4,9 @@ #include <wayland-server.h> #include <wlr/types/wlr_output.h> #include <wlr/render.h> -#include "sway/server.h" -#include "sway/container.h" -#include "sway/workspace.h" -#include "sway/output.h" #include "log.h" +#include "sway/output.h" +#include "sway/server.h" static void output_frame_notify(struct wl_listener *listener, void *data) { struct sway_output *soutput = wl_container_of( @@ -37,19 +35,10 @@ void output_add_notify(struct wl_listener *listener, void *data) { output->wlr_output = wlr_output; output->server = server; - swayc_t *node = new_output(output); - if (!sway_assert(node, "Failed to allocate output")) { - return; - } - - // Switch to workspace if we need to - if (swayc_active_workspace() == NULL) { - swayc_t *ws = node->children->items[0]; - workspace_switch(ws); - } - output->frame.notify = output_frame_notify; wl_signal_add(&wlr_output->events.frame, &output->frame); + + // TODO: Add to tree } void output_remove_notify(struct wl_listener *listener, void *data) { diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index e29b46d7..04f3f42c 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c @@ -1,49 +1,10 @@ #include <stdlib.h> #include <wayland-server.h> #include <wlr/types/wlr_xdg_shell_v6.h> -#include "sway/commands.h" -#include "sway/container.h" -#include "sway/focus.h" -#include "sway/ipc-server.h" #include "sway/server.h" #include "sway/view.h" #include "log.h" -// TODO: move elsewhere -static void temp_ws_cleanup() { - swayc_t *op, *ws; - int i = 0, j; - if (!root_container.children) - return; - while (i < root_container.children->length) { - op = root_container.children->items[i++]; - if (!op->children) - continue; - j = 0; - while (j < op->children->length) { - ws = op->children->items[j++]; - if (ws->children->length == 0 && ws->floating->length == 0 && ws != op->focused) { - if (destroy_workspace(ws)) { - j--; - } - } - } - } -} - -// TODO: move elsewhere -static swayc_t *move_focus_to_tiling(swayc_t *focused) { - if (focused->is_floating) { - if (focused->parent->children->length == 0) { - return focused->parent; - } - // TODO find a better way of doing this - // Or to focused container - return get_focused_container(focused->parent->children->items[0]); - } - return focused; -} - static const char *get_prop(struct sway_view *view, enum sway_view_prop prop) { if (!sway_assert(view->type == SWAY_XDG_SHELL_V6_VIEW, "xdg get_prop for non-xdg view!")) { @@ -88,30 +49,10 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { sway_surface->view = sway_view; // TODO: - // - Consolodate common logic between shells + // - Add to tree // - Wire up listeners // - Handle popups // - Look up pid and open on appropriate workspace // - Set new view to maximized so it behaves nicely // - Criteria - - suspend_workspace_cleanup = true; - //swayc_t *current_ws = swayc_active_workspace(); - swayc_t *prev_focus = get_focused_container(&root_container); - swayc_t *focused = move_focus_to_tiling(prev_focus); - - // TODO: fix new_view - swayc_t *view = new_view(focused, sway_view); - ipc_event_window(view, "new"); - set_focused_container(view); - - swayc_t *output = swayc_parent_by_type(view, C_OUTPUT); - arrange_windows(output, -1, -1); - - swayc_t *workspace = swayc_parent_by_type(focused, C_WORKSPACE); - if (workspace && workspace->fullscreen) { - set_focused_container(workspace->fullscreen); - } - suspend_workspace_cleanup = false; - temp_ws_cleanup(); } diff --git a/sway/main.c b/sway/main.c index 7d6f2873..5710a099 100644 --- a/sway/main.c +++ b/sway/main.c @@ -1,30 +1,24 @@ #define _XOPEN_SOURCE 700 #define _POSIX_C_SOURCE 200112L -#include <stdio.h> -#include <stdlib.h> +#include <getopt.h> +#include <signal.h> #include <stdbool.h> -#include <sys/wait.h> -#include <sys/types.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> #include <sys/stat.h> +#include <sys/types.h> +#include <sys/wait.h> #include <sys/un.h> -#include <signal.h> #include <unistd.h> -#include <getopt.h> #ifdef __linux__ #include <sys/capability.h> #include <sys/prctl.h> #endif -#include "sway/layout.h" -#include "sway/config.h" -#include "sway/security.h" -#include "sway/handlers.h" -#include "sway/input.h" -#include "sway/ipc-server.h" #include "sway/server.h" #include "ipc-client.h" #include "readline.h" #include "stringop.h" -#include "sway.h" #include "log.h" #include "util.h" @@ -39,7 +33,7 @@ void sway_terminate(int exit_code) { } void sig_handler(int signal) { - close_views(&root_container); + //close_views(&root_container); sway_terminate(EXIT_SUCCESS); } @@ -442,17 +436,17 @@ int main(int argc, char **argv) { return 1; } - init_layout(); - ipc_init(); + //init_layout(); + //ipc_init(); - if (validate) { - bool valid = load_main_config(config_path, false); - return valid ? 0 : 1; - } + //if (validate) { + // bool valid = load_main_config(config_path, false); + // return valid ? 0 : 1; + //} - if (!load_main_config(config_path, false)) { - sway_terminate(EXIT_FAILURE); - } + //if (!load_main_config(config_path, false)) { + // sway_terminate(EXIT_FAILURE); + //} if (config_path) { free(config_path); @@ -466,11 +460,11 @@ int main(int argc, char **argv) { server_fini(&server); - ipc_terminate(); + //ipc_terminate(); - if (config) { - free_config(config); - } + //if (config) { + // free_config(config); + //} return exit_value; } diff --git a/sway/border.c b/sway/old/border.c index df0022ce..df0022ce 100644 --- a/sway/border.c +++ b/sway/old/border.c diff --git a/sway/commands.c b/sway/old/commands.c index e1181893..e1181893 100644 --- a/sway/commands.c +++ b/sway/old/commands.c diff --git a/sway/commands/assign.c b/sway/old/commands/assign.c index c3b03bbc..c3b03bbc 100644 --- a/sway/commands/assign.c +++ b/sway/old/commands/assign.c diff --git a/sway/commands/bar.c b/sway/old/commands/bar.c index 04745a6e..04745a6e 100644 --- a/sway/commands/bar.c +++ b/sway/old/commands/bar.c diff --git a/sway/commands/bar/activate_button.c b/sway/old/commands/bar/activate_button.c index 32a1d3e5..32a1d3e5 100644 --- a/sway/commands/bar/activate_button.c +++ b/sway/old/commands/bar/activate_button.c diff --git a/sway/commands/bar/binding_mode_indicator.c b/sway/old/commands/bar/binding_mode_indicator.c index 64f5b84f..64f5b84f 100644 --- a/sway/commands/bar/binding_mode_indicator.c +++ b/sway/old/commands/bar/binding_mode_indicator.c diff --git a/sway/commands/bar/bindsym.c b/sway/old/commands/bar/bindsym.c index 5f90b51a..5f90b51a 100644 --- a/sway/commands/bar/bindsym.c +++ b/sway/old/commands/bar/bindsym.c diff --git a/sway/commands/bar/colors.c b/sway/old/commands/bar/colors.c index 8b3b0aac..8b3b0aac 100644 --- a/sway/commands/bar/colors.c +++ b/sway/old/commands/bar/colors.c diff --git a/sway/commands/bar/context_button.c b/sway/old/commands/bar/context_button.c index 6d7d7aec..6d7d7aec 100644 --- a/sway/commands/bar/context_button.c +++ b/sway/old/commands/bar/context_button.c diff --git a/sway/commands/bar/font.c b/sway/old/commands/bar/font.c index c586c5bc..c586c5bc 100644 --- a/sway/commands/bar/font.c +++ b/sway/old/commands/bar/font.c diff --git a/sway/commands/bar/height.c b/sway/old/commands/bar/height.c index eb576ab3..eb576ab3 100644 --- a/sway/commands/bar/height.c +++ b/sway/old/commands/bar/height.c diff --git a/sway/commands/bar/hidden_state.c b/sway/old/commands/bar/hidden_state.c index 0b49aa6b..0b49aa6b 100644 --- a/sway/commands/bar/hidden_state.c +++ b/sway/old/commands/bar/hidden_state.c diff --git a/sway/commands/bar/icon_theme.c b/sway/old/commands/bar/icon_theme.c index cbfc0be5..cbfc0be5 100644 --- a/sway/commands/bar/icon_theme.c +++ b/sway/old/commands/bar/icon_theme.c diff --git a/sway/commands/bar/id.c b/sway/old/commands/bar/id.c index 1221ebf6..1221ebf6 100644 --- a/sway/commands/bar/id.c +++ b/sway/old/commands/bar/id.c diff --git a/sway/commands/bar/mode.c b/sway/old/commands/bar/mode.c index 36816b93..36816b93 100644 --- a/sway/commands/bar/mode.c +++ b/sway/old/commands/bar/mode.c diff --git a/sway/commands/bar/modifier.c b/sway/old/commands/bar/modifier.c index 153d87e6..153d87e6 100644 --- a/sway/commands/bar/modifier.c +++ b/sway/old/commands/bar/modifier.c diff --git a/sway/commands/bar/output.c b/sway/old/commands/bar/output.c index a5710bc0..a5710bc0 100644 --- a/sway/commands/bar/output.c +++ b/sway/old/commands/bar/output.c diff --git a/sway/commands/bar/pango_markup.c b/sway/old/commands/bar/pango_markup.c index f69e882f..f69e882f 100644 --- a/sway/commands/bar/pango_markup.c +++ b/sway/old/commands/bar/pango_markup.c diff --git a/sway/commands/bar/position.c b/sway/old/commands/bar/position.c index 50de58e2..50de58e2 100644 --- a/sway/commands/bar/position.c +++ b/sway/old/commands/bar/position.c diff --git a/sway/commands/bar/secondary_button.c b/sway/old/commands/bar/secondary_button.c index 745045c5..745045c5 100644 --- a/sway/commands/bar/secondary_button.c +++ b/sway/old/commands/bar/secondary_button.c diff --git a/sway/commands/bar/separator_symbol.c b/sway/old/commands/bar/separator_symbol.c index 2766d8a2..2766d8a2 100644 --- a/sway/commands/bar/separator_symbol.c +++ b/sway/old/commands/bar/separator_symbol.c diff --git a/sway/commands/bar/status_command.c b/sway/old/commands/bar/status_command.c index b227ac47..b227ac47 100644 --- a/sway/commands/bar/status_command.c +++ b/sway/old/commands/bar/status_command.c diff --git a/sway/commands/bar/strip_workspace_numbers.c b/sway/old/commands/bar/strip_workspace_numbers.c index 9ac32482..9ac32482 100644 --- a/sway/commands/bar/strip_workspace_numbers.c +++ b/sway/old/commands/bar/strip_workspace_numbers.c diff --git a/sway/commands/bar/swaybar_command.c b/sway/old/commands/bar/swaybar_command.c index 452e2df5..452e2df5 100644 --- a/sway/commands/bar/swaybar_command.c +++ b/sway/old/commands/bar/swaybar_command.c diff --git a/sway/commands/bar/tray_output.c b/sway/old/commands/bar/tray_output.c index 012304a9..012304a9 100644 --- a/sway/commands/bar/tray_output.c +++ b/sway/old/commands/bar/tray_output.c diff --git a/sway/commands/bar/tray_padding.c b/sway/old/commands/bar/tray_padding.c index ac0572ce..ac0572ce 100644 --- a/sway/commands/bar/tray_padding.c +++ b/sway/old/commands/bar/tray_padding.c diff --git a/sway/commands/bar/workspace_buttons.c b/sway/old/commands/bar/workspace_buttons.c index 67dd2d31..67dd2d31 100644 --- a/sway/commands/bar/workspace_buttons.c +++ b/sway/old/commands/bar/workspace_buttons.c diff --git a/sway/commands/bar/wrap_scroll.c b/sway/old/commands/bar/wrap_scroll.c index 4ed1f12a..4ed1f12a 100644 --- a/sway/commands/bar/wrap_scroll.c +++ b/sway/old/commands/bar/wrap_scroll.c diff --git a/sway/commands/bind.c b/sway/old/commands/bind.c index d9ea37b7..d9ea37b7 100644 --- a/sway/commands/bind.c +++ b/sway/old/commands/bind.c diff --git a/sway/commands/border.c b/sway/old/commands/border.c index c888622e..c888622e 100644 --- a/sway/commands/border.c +++ b/sway/old/commands/border.c diff --git a/sway/commands/client.c b/sway/old/commands/client.c index f3d879cd..f3d879cd 100644 --- a/sway/commands/client.c +++ b/sway/old/commands/client.c diff --git a/sway/commands/clipboard.c b/sway/old/commands/clipboard.c index 95514e78..95514e78 100644 --- a/sway/commands/clipboard.c +++ b/sway/old/commands/clipboard.c diff --git a/sway/commands/commands.c b/sway/old/commands/commands.c index 0c64970c..0c64970c 100644 --- a/sway/commands/commands.c +++ b/sway/old/commands/commands.c diff --git a/sway/commands/debuglog.c b/sway/old/commands/debuglog.c index 658d6165..658d6165 100644 --- a/sway/commands/debuglog.c +++ b/sway/old/commands/debuglog.c diff --git a/sway/commands/default_border.c b/sway/old/commands/default_border.c index 8fbe8d19..8fbe8d19 100644 --- a/sway/commands/default_border.c +++ b/sway/old/commands/default_border.c diff --git a/sway/commands/default_floating_border.c b/sway/old/commands/default_floating_border.c index fb48c1c0..fb48c1c0 100644 --- a/sway/commands/default_floating_border.c +++ b/sway/old/commands/default_floating_border.c diff --git a/sway/commands/exec.c b/sway/old/commands/exec.c index 58ef5f94..58ef5f94 100644 --- a/sway/commands/exec.c +++ b/sway/old/commands/exec.c diff --git a/sway/commands/exec_always.c b/sway/old/commands/exec_always.c index ab2d8622..ab2d8622 100644 --- a/sway/commands/exec_always.c +++ b/sway/old/commands/exec_always.c diff --git a/sway/commands/exit.c b/sway/old/commands/exit.c index f192f86a..f192f86a 100644 --- a/sway/commands/exit.c +++ b/sway/old/commands/exit.c diff --git a/sway/commands/floating.c b/sway/old/commands/floating.c index ccfde532..ccfde532 100644 --- a/sway/commands/floating.c +++ b/sway/old/commands/floating.c diff --git a/sway/commands/floating_maximum_size.c b/sway/old/commands/floating_maximum_size.c index 5bca4d7c..5bca4d7c 100644 --- a/sway/commands/floating_maximum_size.c +++ b/sway/old/commands/floating_maximum_size.c diff --git a/sway/commands/floating_minimum_size.c b/sway/old/commands/floating_minimum_size.c index ba72454c..ba72454c 100644 --- a/sway/commands/floating_minimum_size.c +++ b/sway/old/commands/floating_minimum_size.c diff --git a/sway/commands/floating_mod.c b/sway/old/commands/floating_mod.c index b8e81ab9..b8e81ab9 100644 --- a/sway/commands/floating_mod.c +++ b/sway/old/commands/floating_mod.c diff --git a/sway/commands/floating_scroll.c b/sway/old/commands/floating_scroll.c index 8c50c5bd..8c50c5bd 100644 --- a/sway/commands/floating_scroll.c +++ b/sway/old/commands/floating_scroll.c diff --git a/sway/commands/focus.c b/sway/old/commands/focus.c index c83157b8..c83157b8 100644 --- a/sway/commands/focus.c +++ b/sway/old/commands/focus.c diff --git a/sway/commands/focus_follows_mouse.c b/sway/old/commands/focus_follows_mouse.c index 7c9c2b13..7c9c2b13 100644 --- a/sway/commands/focus_follows_mouse.c +++ b/sway/old/commands/focus_follows_mouse.c diff --git a/sway/commands/font.c b/sway/old/commands/font.c index 32994f8a..32994f8a 100644 --- a/sway/commands/font.c +++ b/sway/old/commands/font.c diff --git a/sway/commands/for_window.c b/sway/old/commands/for_window.c index d1fd1641..d1fd1641 100644 --- a/sway/commands/for_window.c +++ b/sway/old/commands/for_window.c diff --git a/sway/commands/force_focus_wrapping.c b/sway/old/commands/force_focus_wrapping.c index f19dd163..f19dd163 100644 --- a/sway/commands/force_focus_wrapping.c +++ b/sway/old/commands/force_focus_wrapping.c diff --git a/sway/commands/fullscreen.c b/sway/old/commands/fullscreen.c index bfff82f9..bfff82f9 100644 --- a/sway/commands/fullscreen.c +++ b/sway/old/commands/fullscreen.c diff --git a/sway/commands/gaps.c b/sway/old/commands/gaps.c index 0a48592d..0a48592d 100644 --- a/sway/commands/gaps.c +++ b/sway/old/commands/gaps.c diff --git a/sway/commands/hide_edge_borders.c b/sway/old/commands/hide_edge_borders.c index ee2a2644..ee2a2644 100644 --- a/sway/commands/hide_edge_borders.c +++ b/sway/old/commands/hide_edge_borders.c diff --git a/sway/commands/include.c b/sway/old/commands/include.c index 1ba9a10d..1ba9a10d 100644 --- a/sway/commands/include.c +++ b/sway/old/commands/include.c diff --git a/sway/commands/input.c b/sway/old/commands/input.c index ad53d272..ad53d272 100644 --- a/sway/commands/input.c +++ b/sway/old/commands/input.c diff --git a/sway/commands/input/accel_profile.c b/sway/old/commands/input/accel_profile.c index 8288c1ad..8288c1ad 100644 --- a/sway/commands/input/accel_profile.c +++ b/sway/old/commands/input/accel_profile.c diff --git a/sway/commands/input/click_method.c b/sway/old/commands/input/click_method.c index 5e9d3dcb..5e9d3dcb 100644 --- a/sway/commands/input/click_method.c +++ b/sway/old/commands/input/click_method.c diff --git a/sway/commands/input/drag_lock.c b/sway/old/commands/input/drag_lock.c index f5a7beb4..f5a7beb4 100644 --- a/sway/commands/input/drag_lock.c +++ b/sway/old/commands/input/drag_lock.c diff --git a/sway/commands/input/dwt.c b/sway/old/commands/input/dwt.c index 557b2207..557b2207 100644 --- a/sway/commands/input/dwt.c +++ b/sway/old/commands/input/dwt.c diff --git a/sway/commands/input/events.c b/sway/old/commands/input/events.c index 9d54287a..9d54287a 100644 --- a/sway/commands/input/events.c +++ b/sway/old/commands/input/events.c diff --git a/sway/commands/input/left_handed.c b/sway/old/commands/input/left_handed.c index 6c913e70..6c913e70 100644 --- a/sway/commands/input/left_handed.c +++ b/sway/old/commands/input/left_handed.c diff --git a/sway/commands/input/middle_emulation.c b/sway/old/commands/input/middle_emulation.c index 33cdd7d6..33cdd7d6 100644 --- a/sway/commands/input/middle_emulation.c +++ b/sway/old/commands/input/middle_emulation.c diff --git a/sway/commands/input/natural_scroll.c b/sway/old/commands/input/natural_scroll.c index 7bc8b8d0..7bc8b8d0 100644 --- a/sway/commands/input/natural_scroll.c +++ b/sway/old/commands/input/natural_scroll.c diff --git a/sway/commands/input/pointer_accel.c b/sway/old/commands/input/pointer_accel.c index 94f595d1..94f595d1 100644 --- a/sway/commands/input/pointer_accel.c +++ b/sway/old/commands/input/pointer_accel.c diff --git a/sway/commands/input/scroll_method.c b/sway/old/commands/input/scroll_method.c index 5c6c3d7a..5c6c3d7a 100644 --- a/sway/commands/input/scroll_method.c +++ b/sway/old/commands/input/scroll_method.c diff --git a/sway/commands/input/tap.c b/sway/old/commands/input/tap.c index 9e3ca2af..9e3ca2af 100644 --- a/sway/commands/input/tap.c +++ b/sway/old/commands/input/tap.c diff --git a/sway/commands/ipc.c b/sway/old/commands/ipc.c index 0c678961..0c678961 100644 --- a/sway/commands/ipc.c +++ b/sway/old/commands/ipc.c diff --git a/sway/commands/kill.c b/sway/old/commands/kill.c index 742e2b86..742e2b86 100644 --- a/sway/commands/kill.c +++ b/sway/old/commands/kill.c diff --git a/sway/commands/layout.c b/sway/old/commands/layout.c index 57a86565..57a86565 100644 --- a/sway/commands/layout.c +++ b/sway/old/commands/layout.c diff --git a/sway/commands/log_colors.c b/sway/old/commands/log_colors.c index 815d1942..815d1942 100644 --- a/sway/commands/log_colors.c +++ b/sway/old/commands/log_colors.c diff --git a/sway/commands/mark.c b/sway/old/commands/mark.c index c1d959df..c1d959df 100644 --- a/sway/commands/mark.c +++ b/sway/old/commands/mark.c diff --git a/sway/commands/mode.c b/sway/old/commands/mode.c index d2985c54..d2985c54 100644 --- a/sway/commands/mode.c +++ b/sway/old/commands/mode.c diff --git a/sway/commands/mouse_warping.c b/sway/old/commands/mouse_warping.c index 5596d483..5596d483 100644 --- a/sway/commands/mouse_warping.c +++ b/sway/old/commands/mouse_warping.c diff --git a/sway/commands/move.c b/sway/old/commands/move.c index 52c73e22..52c73e22 100644 --- a/sway/commands/move.c +++ b/sway/old/commands/move.c diff --git a/sway/commands/new_float.c b/sway/old/commands/new_float.c index d0f96093..d0f96093 100644 --- a/sway/commands/new_float.c +++ b/sway/old/commands/new_float.c diff --git a/sway/commands/new_window.c b/sway/old/commands/new_window.c index 574a4527..574a4527 100644 --- a/sway/commands/new_window.c +++ b/sway/old/commands/new_window.c diff --git a/sway/commands/no_focus.c b/sway/old/commands/no_focus.c index b3b88e5a..b3b88e5a 100644 --- a/sway/commands/no_focus.c +++ b/sway/old/commands/no_focus.c diff --git a/sway/commands/orientation.c b/sway/old/commands/orientation.c index e54b60ee..e54b60ee 100644 --- a/sway/commands/orientation.c +++ b/sway/old/commands/orientation.c diff --git a/sway/commands/output.c b/sway/old/commands/output.c index 911391d2..911391d2 100644 --- a/sway/commands/output.c +++ b/sway/old/commands/output.c diff --git a/sway/commands/permit.c b/sway/old/commands/permit.c index 7a5e06f7..7a5e06f7 100644 --- a/sway/commands/permit.c +++ b/sway/old/commands/permit.c diff --git a/sway/commands/reload.c b/sway/old/commands/reload.c index 01fcc5ba..01fcc5ba 100644 --- a/sway/commands/reload.c +++ b/sway/old/commands/reload.c diff --git a/sway/commands/resize.c b/sway/old/commands/resize.c index ef52bb07..ef52bb07 100644 --- a/sway/commands/resize.c +++ b/sway/old/commands/resize.c diff --git a/sway/commands/scratchpad.c b/sway/old/commands/scratchpad.c index 6c5c92df..6c5c92df 100644 --- a/sway/commands/scratchpad.c +++ b/sway/old/commands/scratchpad.c diff --git a/sway/commands/seamless_mouse.c b/sway/old/commands/seamless_mouse.c index 7760e88d..7760e88d 100644 --- a/sway/commands/seamless_mouse.c +++ b/sway/old/commands/seamless_mouse.c diff --git a/sway/commands/set.c b/sway/old/commands/set.c index 46fc6d38..46fc6d38 100644 --- a/sway/commands/set.c +++ b/sway/old/commands/set.c diff --git a/sway/commands/show_marks.c b/sway/old/commands/show_marks.c index ed56d9e5..ed56d9e5 100644 --- a/sway/commands/show_marks.c +++ b/sway/old/commands/show_marks.c diff --git a/sway/commands/smart_gaps.c b/sway/old/commands/smart_gaps.c index 815fc501..815fc501 100644 --- a/sway/commands/smart_gaps.c +++ b/sway/old/commands/smart_gaps.c diff --git a/sway/commands/split.c b/sway/old/commands/split.c index e3045a4f..e3045a4f 100644 --- a/sway/commands/split.c +++ b/sway/old/commands/split.c diff --git a/sway/commands/sticky.c b/sway/old/commands/sticky.c index 4899e061..4899e061 100644 --- a/sway/commands/sticky.c +++ b/sway/old/commands/sticky.c diff --git a/sway/commands/unmark.c b/sway/old/commands/unmark.c index ac213261..ac213261 100644 --- a/sway/commands/unmark.c +++ b/sway/old/commands/unmark.c diff --git a/sway/commands/workspace.c b/sway/old/commands/workspace.c index a7839746..a7839746 100644 --- a/sway/commands/workspace.c +++ b/sway/old/commands/workspace.c diff --git a/sway/commands/workspace_auto_back_and_forth.c b/sway/old/commands/workspace_auto_back_and_forth.c index d58ae5c8..d58ae5c8 100644 --- a/sway/commands/workspace_auto_back_and_forth.c +++ b/sway/old/commands/workspace_auto_back_and_forth.c diff --git a/sway/commands/workspace_layout.c b/sway/old/commands/workspace_layout.c index 9ac84be2..9ac84be2 100644 --- a/sway/commands/workspace_layout.c +++ b/sway/old/commands/workspace_layout.c diff --git a/sway/config.c b/sway/old/config.c index aa40c49a..d14653e3 100644 --- a/sway/config.c +++ b/sway/old/config.c @@ -998,6 +998,7 @@ static void invoke_swaybar(struct bar_config *bar) { } static void terminate_swaybar(pid_t pid) { + return; // TODO WLR int ret = kill(pid, SIGTERM); if (ret != 0) { sway_log(L_ERROR, "Unable to terminate swaybar [pid: %d]", pid); @@ -1066,143 +1067,6 @@ void load_swaybars() { list_free(bars); } -void apply_input_config(struct input_config *ic, struct libinput_device *dev) { - if (!ic) { - return; - } - - sway_log(L_DEBUG, "apply_input_config(%s)", ic->identifier); - - if (ic->accel_profile != INT_MIN) { - sway_log(L_DEBUG, "apply_input_config(%s) accel_set_profile(%d)", ic->identifier, ic->accel_profile); - libinput_device_config_accel_set_profile(dev, ic->accel_profile); - } - if (ic->click_method != INT_MIN) { - sway_log(L_DEBUG, "apply_input_config(%s) click_set_method(%d)", ic->identifier, ic->click_method); - libinput_device_config_click_set_method(dev, ic->click_method); - } - if (ic->drag_lock != INT_MIN) { - sway_log(L_DEBUG, "apply_input_config(%s) tap_set_drag_lock_enabled(%d)", ic->identifier, ic->click_method); - libinput_device_config_tap_set_drag_lock_enabled(dev, ic->drag_lock); - } - if (ic->dwt != INT_MIN) { - sway_log(L_DEBUG, "apply_input_config(%s) dwt_set_enabled(%d)", ic->identifier, ic->dwt); - libinput_device_config_dwt_set_enabled(dev, ic->dwt); - } - if (ic->left_handed != INT_MIN) { - sway_log(L_DEBUG, "apply_input_config(%s) left_handed_set_enabled(%d)", ic->identifier, ic->left_handed); - libinput_device_config_left_handed_set(dev, ic->left_handed); - } - if (ic->middle_emulation != INT_MIN) { - sway_log(L_DEBUG, "apply_input_config(%s) middle_emulation_set_enabled(%d)", ic->identifier, ic->middle_emulation); - libinput_device_config_middle_emulation_set_enabled(dev, ic->middle_emulation); - } - if (ic->natural_scroll != INT_MIN) { - sway_log(L_DEBUG, "apply_input_config(%s) natural_scroll_set_enabled(%d)", ic->identifier, ic->natural_scroll); - libinput_device_config_scroll_set_natural_scroll_enabled(dev, ic->natural_scroll); - } - if (ic->pointer_accel != FLT_MIN) { - sway_log(L_DEBUG, "apply_input_config(%s) accel_set_speed(%f)", ic->identifier, ic->pointer_accel); - libinput_device_config_accel_set_speed(dev, ic->pointer_accel); - } - if (ic->scroll_method != INT_MIN) { - sway_log(L_DEBUG, "apply_input_config(%s) scroll_set_method(%d)", ic->identifier, ic->scroll_method); - libinput_device_config_scroll_set_method(dev, ic->scroll_method); - } - if (ic->send_events != INT_MIN) { - sway_log(L_DEBUG, "apply_input_config(%s) send_events_set_mode(%d)", ic->identifier, ic->send_events); - libinput_device_config_send_events_set_mode(dev, ic->send_events); - } - if (ic->tap != INT_MIN) { - sway_log(L_DEBUG, "apply_input_config(%s) tap_set_enabled(%d)", ic->identifier, ic->tap); - libinput_device_config_tap_set_enabled(dev, ic->tap); - } -} - -void apply_output_config(struct output_config *oc, swayc_t *output) { - if (oc && oc->enabled == 0) { - destroy_output(output); - return; - } - - if (oc && oc->width > 0 && oc->height > 0) { - output->width = oc->width; - output->height = oc->height; - - sway_log(L_DEBUG, "Set %s size to %ix%i (%d)", oc->name, oc->width, oc->height, oc->scale); - // TODO WLR: modes - //struct wlc_size new_size = { .w = oc->width, .h = oc->height }; - //wlc_output_set_resolution(output->handle, &new_size, (uint32_t)oc->scale); - } else if (oc) { - //const struct wlc_size *new_size = wlc_output_get_resolution(output->handle); - //wlc_output_set_resolution(output->handle, new_size, (uint32_t)oc->scale); - } - - // TODO WLR: wlr_output_layout - // Find position for it - if (oc && oc->x != -1 && oc->y != -1) { - sway_log(L_DEBUG, "Set %s position to %d, %d", oc->name, oc->x, oc->y); - output->x = oc->x; - output->y = oc->y; - } else { - int x = 0; - for (int i = 0; i < root_container.children->length; ++i) { - swayc_t *c = root_container.children->items[i]; - if (c->type == C_OUTPUT) { - if (c->width + c->x > x) { - x = c->width + c->x; - } - } - } - output->x = x; - } - - if (!oc || !oc->background) { - // Look for a * config for background - int i = list_seq_find(config->output_configs, output_name_cmp, "*"); - if (i >= 0) { - oc = config->output_configs->items[i]; - } else { - oc = NULL; - } - } - - int output_i; - for (output_i = 0; output_i < root_container.children->length; ++output_i) { - if (root_container.children->items[output_i] == output) { - break; - } - } - - /* TODO WLR - if (oc && oc->background) { - if (output->bg_pid != 0) { - terminate_swaybg(output->bg_pid); - } - - sway_log(L_DEBUG, "Setting background for output %d to %s", output_i, oc->background); - - size_t bufsize = 12; - char output_id[bufsize]; - snprintf(output_id, bufsize, "%d", output_i); - output_id[bufsize-1] = 0; - - char *const cmd[] = { - "swaybg", - output_id, - oc->background, - oc->background_option, - NULL, - }; - - output->bg_pid = fork(); - if (output->bg_pid == 0) { - execvp(cmd[0], cmd); - } - } - */ -} - char *do_var_replacement(char *str) { int i; char *find = str; diff --git a/sway/tree/container.c b/sway/old/container.c index 82c0d877..82c0d877 100644 --- a/sway/tree/container.c +++ b/sway/old/container.c diff --git a/sway/tree/criteria.c b/sway/old/criteria.c index e8978ebe..e8978ebe 100644 --- a/sway/tree/criteria.c +++ b/sway/old/criteria.c diff --git a/sway/tree/focus.c b/sway/old/focus.c index 66f7ee17..66f7ee17 100644 --- a/sway/tree/focus.c +++ b/sway/old/focus.c diff --git a/sway/handlers.c b/sway/old/handlers.c index 33e75d6b..33e75d6b 100644 --- a/sway/handlers.c +++ b/sway/old/handlers.c diff --git a/sway/input_state.c b/sway/old/input_state.c index 04aafd37..04aafd37 100644 --- a/sway/input_state.c +++ b/sway/old/input_state.c diff --git a/sway/ipc-json.c b/sway/old/ipc-json.c index 1579a2d9..1579a2d9 100644 --- a/sway/ipc-json.c +++ b/sway/old/ipc-json.c diff --git a/sway/ipc-server.c b/sway/old/ipc-server.c index d4db4e7a..fd64e81b 100644 --- a/sway/ipc-server.c +++ b/sway/old/ipc-server.c @@ -1,10 +1,8 @@ // See https://i3wm.org/docs/ipc.html for protocol information - #ifndef __FreeBSD__ // Any value will hide SOCK_CLOEXEC on FreeBSD (__BSD_VISIBLE=0) #define _XOPEN_SOURCE 700 #endif - #include <errno.h> #include <string.h> #include <sys/socket.h> @@ -56,8 +54,6 @@ struct ipc_client { char *write_buffer; }; -static list_t *ipc_get_pixel_requests = NULL; - struct sockaddr_un *ipc_user_sockaddr(void); int ipc_handle_connection(int fd, uint32_t mask, void *data); int ipc_client_handle_readable(int client_fd, uint32_t mask, void *data); @@ -97,7 +93,6 @@ void ipc_init(void) { setenv("SWAYSOCK", ipc_sockaddr->sun_path, 1); ipc_client_list = create_list(); - ipc_get_pixel_requests = create_list(); ipc_event_source = wl_event_loop_add_fd(server.wl_event_loop, ipc_socket, WL_EVENT_READABLE, ipc_handle_connection, NULL); diff --git a/sway/tree/layout.c b/sway/old/layout.c index 22f81688..22f81688 100644 --- a/sway/tree/layout.c +++ b/sway/old/layout.c diff --git a/sway/tree/output.c b/sway/old/output.c index edfcac98..edfcac98 100644 --- a/sway/tree/output.c +++ b/sway/old/output.c diff --git a/sway/security.c b/sway/old/security.c index fcd70f9d..fcd70f9d 100644 --- a/sway/security.c +++ b/sway/old/security.c diff --git a/sway/tree/workspace.c b/sway/old/workspace.c index 14cde146..14cde146 100644 --- a/sway/tree/workspace.c +++ b/sway/old/workspace.c diff --git a/sway/server.c b/sway/server.c index 940f28b3..8892b917 100644 --- a/sway/server.c +++ b/sway/server.c @@ -10,7 +10,6 @@ // TODO WLR: make Xwayland optional #include <wlr/xwayland.h> #include "sway/server.h" -#include "sway/input.h" #include "log.h" bool server_init(struct sway_server *server) { @@ -23,7 +22,6 @@ bool server_init(struct sway_server *server) { server->renderer = wlr_gles2_renderer_create(server->backend); wl_display_init_shm(server->wl_display); - server->input = sway_input_create(server); server->data_device_manager = wlr_data_device_manager_create(server->wl_display); |