diff options
-rw-r--r-- | ISSUE_TEMPLATE.md | 9 | ||||
-rw-r--r-- | common/util.c | 37 | ||||
-rw-r--r-- | include/util.h | 9 | ||||
-rw-r--r-- | sway/desktop/render.c | 7 | ||||
-rw-r--r-- | sway/tree/view.c | 22 |
5 files changed, 19 insertions, 65 deletions
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 21f0a36e..5f3bb6bb 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,4 +1,11 @@ -Please include the following four components in your bug report: sway version, debug log, configuration (if applicable), and an explanation of steps taken to reproduce the issue. +If you are using the nvidia proprietary driver for any reason, you have two choices: + +1. Uninstall it and use nouveau instead +2. Use X11+i3 and close your browser tab + +If `lsmod | grep nvidia | wc -l` shows anything other than zero, your bug report is not welcome here. + +Otherwise, please include the following four components in your bug report: sway version, debug log, configuration (if applicable), and an explanation of steps taken to reproduce the issue. Obtain your version like so: diff --git a/common/util.c b/common/util.c index 467aa4b5..78d46a2a 100644 --- a/common/util.c +++ b/common/util.c @@ -138,40 +138,3 @@ bool parse_boolean(const char *boolean, bool current) { // All other values are false to match i3 return false; } - -char* resolve_path(const char* path) { - struct stat sb; - ssize_t r; - int i; - char *current = NULL; - char *resolved = NULL; - - if(!(current = strdup(path))) { - return NULL; - } - for (i = 0; i < 16; ++i) { - if (lstat(current, &sb) == -1) { - goto failed; - } - if((sb.st_mode & S_IFMT) != S_IFLNK) { - return current; - } - if (!(resolved = malloc(sb.st_size + 1))) { - goto failed; - } - r = readlink(current, resolved, sb.st_size); - if (r == -1 || r > sb.st_size) { - goto failed; - } - resolved[r] = '\0'; - free(current); - current = strdup(resolved); - free(resolved); - resolved = NULL; - } - -failed: - free(resolved); - free(current); - return NULL; -} diff --git a/include/util.h b/include/util.h index c39c92b1..56ca2eb8 100644 --- a/include/util.h +++ b/include/util.h @@ -59,13 +59,4 @@ uint32_t parse_color(const char *color); */ bool parse_boolean(const char *boolean, bool current); -/** - * Given a path string, recurseively resolves any symlinks to their targets - * (which may be a file, directory) and returns the result. - * argument is returned. Caller must free the returned buffer. - * If an error occures, if the path does not exist or if the path corresponds - * to a dangling symlink, NULL is returned. - */ -char* resolve_path(const char* path); - #endif diff --git a/sway/desktop/render.c b/sway/desktop/render.c index c1fa0c8c..1a72f752 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -781,13 +781,6 @@ static void render_containers_stacked(struct sway_output *output, static void render_containers(struct sway_output *output, pixman_region32_t *damage, struct parent_data *parent) { - if (parent->children->length == 1) { - struct sway_container *child = parent->children->items[0]; - if (child->view) { - render_containers_linear(output, damage, parent); - return; - } - } switch (parent->layout) { case L_NONE: case L_HORIZ: diff --git a/sway/tree/view.c b/sway/tree/view.c index cf67acbb..4bc9e0f3 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -242,23 +242,23 @@ void view_autoconfigure(struct sway_view *view) { view->border_bottom = bottom_y != ws->y + ws->height; } + double x, y, width, height; + x = y = width = height = 0; + double y_offset = 0; + // In a tabbed or stacked container, the container's y is the top of the // title area. We have to offset the surface y by the height of the title, // bar, and disable any top border because we'll always have the title bar. - double y_offset = 0; enum sway_container_layout layout = container_parent_layout(con); - list_t *siblings = container_get_siblings(con); - if (siblings->length > 1 && !container_is_floating(con)) { - if (layout == L_TABBED) { - y_offset = container_titlebar_height(); - view->border_top = false; - } else if (layout == L_STACKED) { - y_offset = container_titlebar_height() * siblings->length; - view->border_top = false; - } + if (layout == L_TABBED && !container_is_floating(con)) { + y_offset = container_titlebar_height(); + view->border_top = false; + } else if (layout == L_STACKED && !container_is_floating(con)) { + list_t *siblings = container_get_siblings(con); + y_offset = container_titlebar_height() * siblings->length; + view->border_top = false; } - double x = 0, y = 0, width = 0, height = 0; switch (view->border) { case B_CSD: case B_NONE: |