diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/CMakeLists.txt | 3 | ||||
-rw-r--r-- | sway/commands.c | 11 | ||||
-rw-r--r-- | sway/handlers.c | 1 | ||||
-rw-r--r-- | sway/main.c | 3 | ||||
-rw-r--r-- | sway/sway-input.5.txt | 31 | ||||
-rw-r--r-- | sway/sway.5.txt | 5 |
6 files changed, 36 insertions, 18 deletions
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt index d23c80b0..e49d1d3d 100644 --- a/sway/CMakeLists.txt +++ b/sway/CMakeLists.txt @@ -4,7 +4,7 @@ include_directories( ${PCRE_INCLUDE_DIRS} ${JSONC_INCLUDE_DIRS} ${XKBCOMMON_INCLUDE_DIRS} - ${LIBINPUT_LIBRARIES} + ${LIBINPUT_INCLUDE_DIRS} ) add_executable(sway @@ -56,3 +56,4 @@ install( add_manpage(sway 1) add_manpage(sway 5) +add_manpage(sway-input 5) diff --git a/sway/commands.c b/sway/commands.c index f6326038..9f6e5032 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -169,15 +169,18 @@ static struct cmd_results *cmd_assign(int argc, char **argv) { char *criteria = *argv++; - if (strncmp(*argv, "→", 1) == 0) { + if (strncmp(*argv, "→", strlen("→")) == 0) { + if (argc < 3) { + return cmd_results_new(CMD_INVALID, "assign", "Missing workspace"); + } argv++; } char *movecmd = "move container to workspace "; - int arglen = strlen(*argv); - char *cmdlist = calloc(1, sizeof(movecmd) + arglen); + int arglen = strlen(movecmd) + strlen(*argv) + 1; + char *cmdlist = calloc(1, arglen); - sprintf(cmdlist, "%s%s", movecmd, *argv); + snprintf(cmdlist, arglen, "%s%s", movecmd, *argv); struct criteria *crit = malloc(sizeof(struct criteria)); crit->crit_raw = strdup(criteria); diff --git a/sway/handlers.c b/sway/handlers.c index b1c0e26a..bad8b59a 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -266,6 +266,7 @@ static bool handle_view_created(wlc_handle handle) { sway_log(L_DEBUG, "Adding unmanaged window %p to %p", h, output->unmanaged); list_add(output->unmanaged, h); } + wlc_view_set_mask(handle, VISIBLE); return true; } diff --git a/sway/main.c b/sway/main.c index bec6a725..db2ed856 100644 --- a/sway/main.c +++ b/sway/main.c @@ -187,6 +187,9 @@ int main(int argc, char **argv) { // handle SIGTERM signals signal(SIGTERM, sig_handler); + // prevent ipc from crashing sway + signal(SIGPIPE, SIG_IGN); + #if defined SWAY_GIT_VERSION && defined SWAY_GIT_BRANCH && defined SWAY_VERSION_DATE sway_log(L_INFO, "Starting sway version %s (%s, branch \"%s\")\n", SWAY_GIT_VERSION, SWAY_VERSION_DATE, SWAY_GIT_BRANCH); #endif diff --git a/sway/sway-input.5.txt b/sway/sway-input.5.txt index ec5d1314..1380d1f4 100644 --- a/sway/sway-input.5.txt +++ b/sway/sway-input.5.txt @@ -1,46 +1,51 @@ ///// vim:set ts=4 sw=4 tw=82 noet: ///// -sway (5) -======== +sway-input (5) +============== Name ---- -sway - input configuration file and commands +sway-input - input configuration file and commands Description ----------- -Sway allows for configuration of libinput dveices. +Sway allows for configuration of libinput devices. Commands -------- -**input** <identifier> click_method <none|button_areas|clickfinger>: +**input** <identifier> click_method <none|button_areas|clickfinger>:: Changes the click method for the specified device. -**input** <identifier> drag_lock <enabled|disabled>: +**input** <identifier> drag_lock <enabled|disabled>:: Enables or disables drag lock for specified input device. -**input** <identifier> dwt <enabled|disabled>: +**input** <identifier> dwt <enabled|disabled>:: Enables or disables disable-while-typing for the specified input device. -**input** <identifier> events <enable|disabled>: +**input** <identifier> events <enable|disabled>:: Enables or disables send_events for specified input device. (Disabling send_events disables the input device) -**input** <identifier> middle_emulation <enabled|disabled>: +**input** <identifier> middle_emulation <enabled|disabled>:: Enables or disables middle click emulation. -**input** <identifier> natural_scroll <enabled|disabled>: +**input** <identifier> natural_scroll <enabled|disabled>:: Enables or disables natural scrolling for the specified input device. -**input** <identifier> pointer_accel <[-1,1]>: +**input** <identifier> pointer_accel <[-1,1]>:: Changes the pointer acceleration for the specified input device. -**input** <identifier> scroll_method <none|two_finger|edge|on_button_down>: +**input** <identifier> scroll_method <none|two_finger|edge|on_button_down>:: Changes the scroll method for the specified input device. -**input** <identifier> tap <enabled|disabled>: +**input** <identifier> tap <enabled|disabled>:: Enables or disables tap for specified input device. + +See Also +-------- + +**sway**(5) diff --git a/sway/sway.5.txt b/sway/sway.5.txt index 9777491e..b54ae8da 100644 --- a/sway/sway.5.txt +++ b/sway/sway.5.txt @@ -224,3 +224,8 @@ Currently supported attributes: Compare against the workspace name for this view. Can be a regular expression. If value is _focused_ then all the views on the currently focused workspace matches. + +See Also +-------- + +**sway**(1) **sway-input**(5) |