aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/pango.c5
-rw-r--r--contrib/awesome.config63
-rw-r--r--sway/tree/workspace.c10
3 files changed, 5 insertions, 73 deletions
diff --git a/common/pango.c b/common/pango.c
index 5afd72d8..ba74692e 100644
--- a/common/pango.c
+++ b/common/pango.c
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "cairo.h"
#include "log.h"
#include "stringop.h"
@@ -113,6 +114,10 @@ void pango_printf(cairo_t *cairo, const char *font,
va_end(args);
PangoLayout *layout = get_pango_layout(cairo, font, buf, scale, markup);
+ cairo_font_options_t *fo = cairo_font_options_create();
+ cairo_get_font_options(cairo, fo);
+ pango_cairo_context_set_font_options(pango_layout_get_context(layout), fo);
+ cairo_font_options_destroy(fo);
pango_cairo_update_layout(cairo, layout);
pango_cairo_show_layout(cairo, layout);
g_object_unref(layout);
diff --git a/contrib/awesome.config b/contrib/awesome.config
deleted file mode 100644
index 41e17c91..00000000
--- a/contrib/awesome.config
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# Replicate some of Awesome's default layout manipulation configuration for Sway
-#
-# Differences:
-# - Layout switching doesn't use the spacebar (i.e. i3/Sway behavior to switch to/from floating windows)
-# and uses the 'A' key instead (as in auto)
-# - Resizing windows uses i3/Sway's more versatile Mod4+r
-# - no tags
-# - no Maximize/Minize, alternatives to Maximize would be to switch to Stacked/Tabbed layouts
-# via Mod4+w or Mod4+s.
-# - kill focused client is available on Mod4+Shift+q (instead of Mod4+Shift+c, which maps to Sway's
-# config reload)
-# - probably many more ...
-
-# Awesome-style container traversal using Vim-like binding
-set $next j
-set $prev k
-
-#
-# Moving around:
-#
- # Move your focus around
- bindsym $mod+$next focus next
- bindsym $mod+$prev focus prev
-
- # _move_ the focused window with the same, but add Shift
- bindsym $mod+Shift+$next move next
- bindsym $mod+Shift+$prev move prev
-
-#
-# Layout:
-#
- workspace_layout auto left
-
- # This is usually bound to $mod+space, but this works well in practice by keeping
- # all the layout switching keys grouped together.
- bindsym $mod+a layout auto next
- bindsym $mod+Shift+a layout auto prev
-
- # Promote a child to master position in an auto layout
- bindsym $mod+Control+Return move first
-
- # Increase/decrease number of master elements in auto layout
- bindsym $mod+Shift+h layout auto master inc 1
- bindsym $mod+Shift+l layout auto master inc -1
-
- # Increase/decrease number of slave element groups in auto layout
- bindsym $mod+Control+h layout auto ncol inc 1
- bindsym $mod+Control+l layout auto ncol inc -1
-
-#
-# Resizing containers:
-# Again, not really the way Awesome works well, but in spirit with i3/Sway and it works well.
-#
-mode "resize" {
- bindsym Left resize shrink width 20 px
- bindsym Down resize grow height 20 px
- bindsym Up resize shrink height 20 px
- bindsym Right resize grow width 20 px
-}
-bindsym $mod+r mode "resize"
-
-new_window pixel 1
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index 18746430..b0c440c1 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -389,13 +389,11 @@ bool workspace_switch(struct sway_workspace *workspace,
struct sway_output *next_output = workspace->output;
struct sway_workspace *next_output_prev_ws =
output_get_active_workspace(next_output);
- bool has_sticky = false;
if (workspace != next_output_prev_ws) {
for (int i = 0; i < next_output_prev_ws->floating->length; ++i) {
struct sway_container *floater =
next_output_prev_ws->floating->items[i];
if (floater->is_sticky) {
- has_sticky = true;
container_detach(floater);
workspace_add_floating(workspace, floater);
if (&floater->node == focus) {
@@ -414,14 +412,6 @@ bool workspace_switch(struct sway_workspace *workspace,
if (next == NULL) {
next = &workspace->node;
}
- if (has_sticky) {
- // If there's a sticky container, we might be setting focus to the same
- // container that's already focused, so seat_set_focus is effectively a
- // no op. We therefore need to send the IPC event and clean up the old
- // workspace here.
- ipc_event_workspace(active_ws, workspace, "focus");
- workspace_consider_destroy(active_ws);
- }
seat_set_focus(seat, next);
arrange_workspace(workspace);
cursor_send_pointer_motion(seat->cursor, 0, true);