Update to i3-4.4

This commit is contained in:
dcoppa 2012-12-13 12:10:13 +00:00
parent 4958da850e
commit 06edf25d89
24 changed files with 181 additions and 376 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.52 2012/11/13 08:44:01 dcoppa Exp $
# $OpenBSD: Makefile,v 1.53 2012/12/13 12:10:13 dcoppa Exp $
COMMENT = improved dynamic tiling window manager
DISTNAME = i3-4.3
REVISION = 5
DISTNAME = i3-4.4
CATEGORIES = x11
EXTRACT_SUFX = .tar.bz2
@ -17,7 +16,7 @@ PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM = Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = GL X11 Xcursor Xrender c cairo ev expat \
WANTLIB = GL X11 Xcursor Xext Xrender c cairo ev expat \
fontconfig freetype glib-2.0 gobject-2.0 m \
pango-1.0 pangocairo-1.0 pangoft2-1.0 pcre \
pixman-1 png pthread pthread-stubs \
@ -62,7 +61,8 @@ FAKE_FLAGS = PREFIX=${PREFIX} \
INSTALL_SCRIPT="${INSTALL_SCRIPT}"
post-configure:
${SUBST_CMD} ${WRKSRC}/i3.config \
${SUBST_CMD} ${WRKSRC}/i3-dmenu-desktop \
${WRKSRC}/i3.config \
${WRKSRC}/i3.config.keycodes \
${WRKSRC}/src/cfgparse.y \
${WRKSRC}/src/commands.c \
@ -77,7 +77,8 @@ post-install:
${SUBST_CMD} -o ${SHAREOWN} -g ${SHAREGRP} \
-c ${WRKBUILD}/man/i3.1 \
${PREFIX}/man/man1/i3.1
@rm ${PREFIX}/man/man1/i3-dump-log.1 \
@rm ${PREFIX}/man/man1/i3-dmenu-desktop.1 \
${PREFIX}/man/man1/i3-dump-log.1 \
${PREFIX}/man/man1/i3-sensible*.1
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (i3-4.3.tar.bz2) = iVv1hgklNe+yvHI7pZnHGgJ3aBFeVgUvER/IuxSNuSU=
SIZE (i3-4.3.tar.bz2) = 852253
SHA256 (i3-4.4.tar.bz2) = mYdXSeq21vWjBY8zJVMs0iOp+iJ3GlTC/QbA3tl/SBs=
SIZE (i3-4.4.tar.bz2) = 884182

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-i3-config-wizard_main_c,v 1.6 2012/12/08 21:41:47 dcoppa Exp $
From 69e15bba5df807809a91baec08bc45b193ab8e85 Mon Sep 17 00:00:00 2001
From: David Coppa <dcoppa@gmail.com>
Date: Thu, 06 Dec 2012 11:30:14 +0000
Subject: OpenBSD has getline() now
--- i3-config-wizard/main.c.orig Tue May 8 16:42:21 2012
+++ i3-config-wizard/main.c Tue May 8 16:42:37 2012
@@ -13,7 +13,7 @@
#endif
/* For systems without getline, fall back to fgetln */
-#if defined(__APPLE__) || (defined(__FreeBSD__) && __FreeBSD_version < 800000) || defined(__OpenBSD__)
+#if defined(__APPLE__) || (defined(__FreeBSD__) && __FreeBSD_version < 800000)
#define USE_FGETLN
#elif defined(__FreeBSD__)
/* Defining this macro before including stdio.h is necessary in order to have

View File

@ -0,0 +1,63 @@
$OpenBSD: patch-i3-dmenu-desktop,v 1.1 2012/12/13 12:10:13 dcoppa Exp $
--- i3-dmenu-desktop.orig Thu Dec 13 09:55:16 2012
+++ i3-dmenu-desktop Thu Dec 13 10:00:16 2012
@@ -88,7 +88,7 @@ $xdg_data_home = $ENV{HOME} . '/.local/share' if
! -d $xdg_data_home;
my $xdg_data_dirs = $ENV{XDG_DATA_DIRS};
-$xdg_data_dirs = '/usr/local/share/:/usr/share/' if
+$xdg_data_dirs = '${LOCALBASE}/share/' if
!defined($xdg_data_dirs) ||
$xdg_data_dirs eq '';
@@ -187,12 +187,12 @@ for my $file (values %desktops) {
# 'evince.desktop' => {
# 'Exec' => 'evince %U',
# 'Name' => 'Dokumentenbetrachter',
-# '_Location' => '/usr/share/applications/evince.desktop'
+# '_Location' => '${LOCALBASE}/share/applications/evince.desktop'
# },
# 'gedit.desktop' => {
# 'Exec' => 'gedit %U',
# 'Name' => 'gedit',
-# '_Location' => '/usr/share/applications/gedit.desktop'
+# '_Location' => '${LOCALBASE}/share/applications/gedit.desktop'
# }
# };
@@ -355,7 +355,7 @@ if (exists($app->{Terminal}) && $app->{Terminal}) {
# we need to create a temporary script that contains the full command line
# as the syntax for starting commands with arguments varies from terminal
# emulator to terminal emulator.
- # Then, we launch that script with i3-sensible-terminal.
+ # Then, we launch that script with xterm.
my ($fh, $filename) = tempfile();
binmode($fh, ':utf8');
say $fh <<EOT;
@@ -366,7 +366,7 @@ EOT
close($fh);
chmod 0755, $filename;
- $cmd = qq|exec i3-sensible-terminal -e "$filename"|;
+ $cmd = qq|exec ${X11BASE}/bin/xterm -e "$filename"|;
} else {
# i3 executes applications by passing the argument to i3s “exec” command
# as-is to $SHELL -c. The i3 parser supports quoted strings: When a string
@@ -407,7 +407,7 @@ notifications.
The .desktop files are searched in $XDG_DATA_HOME/applications (by default
$HOME/.local/share/applications) and in the "applications" subdirectory of each
-entry of $XDG_DATA_DIRS (by default /usr/local/share/:/usr/share/).
+entry of $XDG_DATA_DIRS (by default ${LOCALBASE}/share/).
Files with the same name in $XDG_DATA_HOME/applications take precedence over
files in $XDG_DATA_DIRS, so that you can overwrite parts of the system-wide
@@ -421,7 +421,7 @@ file respectively) by appending it to the name of the
want to launch "GNU Emacs 24" with the patch /tmp/foobar.txt, you would type
"emacs", press TAB, type " /tmp/foobar.txt" and press ENTER.
-.desktop files with Terminal=true are started using i3-sensible-terminal(1).
+.desktop files with Terminal=true are started using xterm(1).
.desktop files with NoDisplay=true or Hidden=true are skipped.

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-i3_config,v 1.13 2012/09/21 17:16:14 dcoppa Exp $
--- i3.config.orig Wed Sep 19 18:08:09 2012
+++ i3.config Fri Sep 21 14:09:31 2012
$OpenBSD: patch-i3_config,v 1.14 2012/12/13 12:10:13 dcoppa Exp $
--- i3.config.orig Thu Dec 13 10:02:05 2012
+++ i3.config Thu Dec 13 10:03:44 2012
@@ -22,13 +22,13 @@ font -misc-fixed-medium-r-normal--13-120-75-75-C-70-is
floating_modifier Mod1
@ -14,6 +14,6 @@ $OpenBSD: patch-i3_config,v 1.13 2012/09/21 17:16:14 dcoppa Exp $
# start dmenu (a program launcher)
-bindsym Mod1+d exec dmenu_run
+bindsym Mod1+d exec ${LOCALBASE}/bin/dmenu_run
# change focus
bindsym Mod1+j focus left
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-i3_config_keycodes,v 1.9 2012/09/21 17:16:14 dcoppa Exp $
$OpenBSD: patch-i3_config_keycodes,v 1.10 2012/12/13 12:10:13 dcoppa Exp $
Fix keycodes for the "Left", "Down", "Up" and "Right" keys: they're
different between Linux and OpenBSD.
--- i3.config.keycodes.orig Wed Sep 19 18:08:09 2012
+++ i3.config.keycodes Fri Sep 21 14:10:09 2012
--- i3.config.keycodes.orig Wed Dec 12 00:08:17 2012
+++ i3.config.keycodes Thu Dec 13 10:10:49 2012
@@ -23,13 +23,13 @@ font -misc-fixed-medium-r-normal--13-120-75-75-C-70-is
floating_modifier $mod
@ -18,10 +18,10 @@ different between Linux and OpenBSD.
# start dmenu (a program launcher)
-bindcode $mod+40 exec dmenu_run
+bindcode $mod+40 exec ${LOCALBASE}/bin/dmenu_run
# change focus
bindcode $mod+44 focus left
@@ -38,10 +38,10 @@ bindcode $mod+46 focus up
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
@@ -42,10 +42,10 @@ bindcode $mod+46 focus up
bindcode $mod+47 focus right
# alternatively, you can use the cursor keys:
@ -36,7 +36,7 @@ different between Linux and OpenBSD.
# move focused window
bindcode $mod+Shift+44 move left
@@ -50,10 +50,10 @@ bindcode $mod+Shift+46 move up
@@ -54,10 +54,10 @@ bindcode $mod+Shift+46 move up
bindcode $mod+Shift+47 move right
# alternatively, you can use the cursor keys:
@ -51,7 +51,7 @@ different between Linux and OpenBSD.
# split in horizontal orientation
bindcode $mod+43 split h
@@ -126,10 +126,10 @@ mode "resize" {
@@ -130,10 +130,10 @@ mode "resize" {
bindcode 47 resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-i3_xsession_desktop,v 1.1 2012/09/21 17:16:14 dcoppa Exp $
From 9fa0dc657b44118fae0d016fb85fa1f4c425503f Mon Sep 17 00:00:00 2001
From: Kacper Kowalik (Xarthisius) <xarthisius@gentoo.org>
Date: Wed, 19 Sep 2012 18:00:28 +0000
Subject: Fix xsession.desktop to comply to fdo standard
--- i3.xsession.desktop.orig Fri Sep 21 13:42:09 2012
+++ i3.xsession.desktop Fri Sep 21 13:42:30 2012
@@ -1,6 +1,5 @@
[Desktop Entry]
-Encoding=UTF-8
Name=i3
Comment=improved dynamic tiling window manager
Exec=i3
-Type=XSession
+Type=Application

View File

@ -1,19 +0,0 @@
$OpenBSD: patch-include_data_h,v 1.6 2012/11/13 08:44:02 dcoppa Exp $
From e7a4580c5f5f895df2990dae0f26a8662d58d80f Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Mon, 29 Oct 2012 15:41:16 +0000
Subject: Bugfix: force rendering when the parent's orientation changed
Otherwise, the split indicator might not be refreshed even though
it should be.
--- include/data.h.orig Wed Sep 19 18:08:09 2012
+++ include/data.h Fri Nov 2 14:32:07 2012
@@ -135,6 +135,7 @@ struct deco_render_params {
Rect con_deco_rect;
uint32_t background;
bool con_is_leaf;
+ orientation_t parent_orientation;
};
/**

View File

@ -1,15 +1,15 @@
$OpenBSD: patch-man_i3-migrate-config-to-v4_1,v 1.6 2012/09/21 17:16:14 dcoppa Exp $
$OpenBSD: patch-man_i3-migrate-config-to-v4_1,v 1.7 2012/12/13 12:10:13 dcoppa Exp $
Fix fatal error: "argument count wrong: line arguments >= 2 (have 1)"
--- man/i3-migrate-config-to-v4.1.orig Fri Sep 21 11:38:26 2012
+++ man/i3-migrate-config-to-v4.1 Fri Sep 21 11:38:32 2012
--- man/i3-migrate-config-to-v4.1.orig Thu Dec 13 10:12:44 2012
+++ man/i3-migrate-config-to-v4.1 Thu Dec 13 10:13:03 2012
@@ -7,7 +7,7 @@
.\" Source: i3 4.3
.\" Source: i3 4.4
.\" Language: English
.\"
-.TH "I3\-MIGRATE\-CONFIG\" "1" "09/19/2012" "i3 4\&.3" "i3 Manual"
+.TH "I3\-MIGRATE\-CONFIG" "1" "09/19/2012" "i3 4\&.3" "i3 Manual"
-.TH "I3\-MIGRATE\-CONFIG\" "1" "12/12/2012" "i3 4\&.4" "i3 Manual"
+.TH "I3\-MIGRATE\-CONFIG" "1" "12/12/2012" "i3 4\&.4" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-parser-specs_config_spec,v 1.1 2012/12/13 12:10:13 dcoppa Exp $
Workaround for an error caused by xcb-util-0.3.6
In file included from src/config_parser.c:49:
include/GENERATED_config_enums.h:70: error: 'FONT' redeclared as different kind of symbol
/usr/X11R6/include/xcb/xcb_atom.h:60: error: previous declaration of 'FONT' was here
--- parser-specs/config.spec.orig Thu Dec 13 11:12:38 2012
+++ parser-specs/config.spec Thu Dec 13 11:15:57 2012
@@ -20,7 +20,7 @@ state INITIAL:
'set' -> IGNORE_LINE
bindtype = 'bindsym', 'bindcode', 'bind' -> BINDING
'bar' -> BARBRACE
- 'font' -> FONT
+ 'font' -> WINDOW_FONT
'mode' -> MODENAME
'floating_minimum_size' -> FLOATING_MINIMUM_SIZE_WIDTH
'floating_maximum_size' -> FLOATING_MAXIMUM_SIZE_WIDTH
@@ -264,7 +264,7 @@ state EXEC:
-> call cfg_exec($exectype, $no_startup_id, $command)
# font font
-state FONT:
+state WINDOW_FONT:
font = string
-> call cfg_font($font)

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_cfgparse_y,v 1.6 2012/09/21 17:16:14 dcoppa Exp $
--- src/cfgparse.y.orig Thu Sep 20 14:33:19 2012
+++ src/cfgparse.y Thu Sep 20 14:35:04 2012
@@ -325,16 +325,16 @@ static void start_configerror_nagbar(const char *confi
$OpenBSD: patch-src_cfgparse_y,v 1.7 2012/12/13 12:10:13 dcoppa Exp $
--- src/cfgparse.y.orig Wed Dec 12 00:08:17 2012
+++ src/cfgparse.y Thu Dec 13 09:45:54 2012
@@ -328,16 +328,16 @@ static void start_configerror_nagbar(const char *confi
/* child */
if (configerror_pid == 0) {
char *edit_command, *pager_command;

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_commands_c,v 1.4 2012/09/21 17:16:14 dcoppa Exp $
--- src/commands.c.orig Thu Sep 20 14:38:12 2012
+++ src/commands.c Thu Sep 20 14:39:06 2012
@@ -160,7 +160,7 @@ void cmd_MIGRATION_start_nagbar(void) {
$OpenBSD: patch-src_commands_c,v 1.5 2012/12/13 12:10:13 dcoppa Exp $
--- src/commands.c.orig Wed Dec 12 00:08:17 2012
+++ src/commands.c Thu Dec 13 09:45:54 2012
@@ -182,7 +182,7 @@ void cmd_MIGRATION_start_nagbar(void) {
/* child */
if (migration_pid == 0) {
char *pageraction;

View File

@ -1,33 +0,0 @@
$OpenBSD: patch-src_con_c,v 1.8 2012/10/01 08:12:17 dcoppa Exp $
From 31e8d7f2f81f115f70c1fc3eb404b0cfbc13ddf4 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Fri, 28 Sep 2012 22:02:41 +0000
Subject: Bugfix: Correctly move floating windows to invisible workspaces cross-output
--- src/con.c.orig Wed Sep 19 18:08:09 2012
+++ src/con.c Mon Oct 1 09:44:02 2012
@@ -666,13 +666,20 @@ void con_move_to_workspace(Con *con, Con *workspace, b
con->percent = 0.0;
con_fix_percent(next);
- /* 7: focus the con on the target workspace (the X focus is only updated by
- * calling tree_render(), so for the "real" focus this is a no-op).
+ /* 7: focus the con on the target workspace, but only within that
+ * workspace, that is, don't move focus away if the target workspace is
+ * invisible.
* We dont focus the con for i3 pseudo workspaces like __i3_scratch and
* we dont focus when there is a fullscreen con on that workspace. */
if ((workspace->name[0] != '_' || workspace->name[1] != '_') &&
- con_get_fullscreen_con(workspace, CF_OUTPUT) == NULL)
+ con_get_fullscreen_con(workspace, CF_OUTPUT) == NULL) {
+ /* We need to save focus on workspace level and restore it afterwards.
+ * Otherwise, we might focus a different workspace without actually
+ * switching workspaces. */
+ Con *old_focus = TAILQ_FIRST(&(output_get_content(dest_output)->focus_head));
con_focus(con_descend_focused(con));
+ con_focus(old_focus);
+ }
/* 8: when moving to a visible workspace on a different output, we keep the
* con focused. Otherwise, we leave the focus on the current workspace as we

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_config_c,v 1.8 2012/09/21 17:16:14 dcoppa Exp $
--- src/config.c.orig Wed Sep 19 18:08:09 2012
+++ src/config.c Thu Sep 20 14:12:10 2012
@@ -246,7 +246,7 @@ static char *get_config_path(const char *override_conf
$OpenBSD: patch-src_config_c,v 1.9 2012/12/13 12:10:13 dcoppa Exp $
--- src/config.c.orig Wed Dec 12 00:08:17 2012
+++ src/config.c Thu Dec 13 09:45:54 2012
@@ -254,7 +254,7 @@ static char *get_config_path(const char *override_conf
/* 4: check for $XDG_CONFIG_DIRS/i3/config */
if ((xdg_config_dirs = getenv("XDG_CONFIG_DIRS")) == NULL)

View File

@ -1,22 +0,0 @@
$OpenBSD: patch-src_floating_c,v 1.15 2012/11/13 08:44:02 dcoppa Exp $
From 8480b4cb58c30a5fa4ff9761aaed198efa8429f8 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Fri, 28 Sep 2012 16:23:01 +0000
Subject: Bugfix: don't crash when dragged floating window closes
Previously, while the loop would not be executed anymore, the
callback (for actually repositioning the window after a MotionNotify)
would still get called once. This commit avoids that, thus fixing
the crash.
--- src/floating.c.orig Wed Sep 19 18:08:09 2012
+++ src/floating.c Mon Oct 1 09:42:59 2012
@@ -570,7 +570,7 @@ void drag_pointer(Con *con, const xcb_button_press_eve
free(inside_event);
} while ((inside_event = xcb_poll_for_event(conn)) != NULL);
- if (last_motion_notify == NULL)
+ if (last_motion_notify == NULL || loop_done)
continue;
new_x = ((xcb_motion_notify_event_t*)last_motion_notify)->root_x;

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_i3_mk,v 1.1 2012/09/21 17:16:14 dcoppa Exp $
--- src/i3.mk.orig Fri Sep 21 11:56:21 2012
+++ src/i3.mk Fri Sep 21 11:59:56 2012
@@ -69,16 +69,13 @@ install-i3: i3
$OpenBSD: patch-src_i3_mk,v 1.2 2012/12/13 12:10:13 dcoppa Exp $
--- src/i3.mk.orig Thu Dec 13 10:15:15 2012
+++ src/i3.mk Thu Dec 13 10:19:39 2012
@@ -82,17 +82,14 @@ install-i3: i3
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/include/i3
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/xsessions
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/applications
@ -10,6 +10,7 @@ $OpenBSD: patch-src_i3_mk,v 1.1 2012/09/21 17:16:14 dcoppa Exp $
- $(INSTALL) -m 0755 i3-sensible-editor $(DESTDIR)$(PREFIX)/bin/
- $(INSTALL) -m 0755 i3-sensible-pager $(DESTDIR)$(PREFIX)/bin/
- $(INSTALL) -m 0755 i3-sensible-terminal $(DESTDIR)$(PREFIX)/bin/
- $(INSTALL) -m 0755 i3-dmenu-desktop $(DESTDIR)$(PREFIX)/bin/
- test -e $(DESTDIR)$(SYSCONFDIR)/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config
- test -e $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes || $(INSTALL) -m 0644 i3.config.keycodes $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes
- $(INSTALL) -m 0644 i3.xsession.desktop $(DESTDIR)$(PREFIX)/share/xsessions/i3.desktop
@ -17,6 +18,7 @@ $OpenBSD: patch-src_i3_mk,v 1.1 2012/09/21 17:16:14 dcoppa Exp $
- $(INSTALL) -m 0644 include/i3/ipc.h $(DESTDIR)$(PREFIX)/include/i3/
+ ${INSTALL_PROGRAM} i3 $(DESTDIR)$(PREFIX)/bin/
+ ${INSTALL_SCRIPT} i3-migrate-config-to-v4 $(DESTDIR)$(PREFIX)/bin/
+ ${INSTALL_SCRIPT} i3-dmenu-desktop $(DESTDIR)$(PREFIX)/bin/
+ ${INSTALL_DATA} i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config
+ ${INSTALL_DATA} i3.config.keycodes $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes
+ ${INSTALL_DATA} i3.xsession.desktop $(DESTDIR)$(PREFIX)/share/xsessions/i3.desktop

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-src_ipc_c,v 1.8 2012/09/21 17:16:14 dcoppa Exp $
$OpenBSD: patch-src_ipc_c,v 1.9 2012/12/13 12:10:14 dcoppa Exp $
Add missing header
--- src/ipc.c.orig Wed Sep 19 18:08:09 2012
+++ src/ipc.c Thu Sep 20 14:12:10 2012
@@ -11,6 +11,7 @@
*/
--- src/ipc.c.orig Wed Dec 12 00:08:17 2012
+++ src/ipc.c Thu Dec 13 09:45:54 2012
@@ -12,6 +12,7 @@
#include "all.h"
#include "yajl_utils.h"
+#include <sys/types.h>
#include <sys/socket.h>

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-src_main_c,v 1.5 2012/09/21 17:16:14 dcoppa Exp $
$OpenBSD: patch-src_main_c,v 1.6 2012/12/13 12:10:14 dcoppa Exp $
OpenBSD lacks POSIX shared memory support (shm_open() and friends)
--- src/main.c.orig Wed Sep 19 18:08:09 2012
+++ src/main.c Thu Sep 20 11:56:52 2012
--- src/main.c.orig Wed Dec 12 00:08:17 2012
+++ src/main.c Thu Dec 13 10:26:26 2012
@@ -219,11 +219,13 @@ static void i3_exit(void) {
ev_loop_destroy(main_loop);
#endif
@ -18,20 +18,19 @@ OpenBSD lacks POSIX shared memory support (shm_open() and friends)
}
/*
@@ -234,10 +236,12 @@ static void i3_exit(void) {
@@ -233,9 +235,11 @@ static void i3_exit(void) {
*
*/
static void handle_signal(int sig, siginfo_t *info, void *data) {
fprintf(stderr, "Received signal %d, terminating\n", sig);
+#if !defined(__OpenBSD__)
if (*shmlogname != '\0') {
fprintf(stderr, "Closing SHM log \"%s\"\n", shmlogname);
shm_unlink(shmlogname);
}
+#endif
fflush(stderr);
raise(sig);
}
@@ -266,8 +270,10 @@ int main(int argc, char *argv[]) {
@@ -263,8 +267,10 @@ int main(int argc, char *argv[]) {
{"force-xinerama", no_argument, 0, 0},
{"force_xinerama", no_argument, 0, 0},
{"disable-signalhandler", no_argument, 0, 0},
@ -42,7 +41,7 @@ OpenBSD lacks POSIX shared memory support (shm_open() and friends)
{"get-socketpath", no_argument, 0, 0},
{"get_socketpath", no_argument, 0, 0},
{"fake_outputs", required_argument, 0, 0},
@@ -292,8 +298,10 @@ int main(int argc, char *argv[]) {
@@ -290,8 +296,10 @@ int main(int argc, char *argv[]) {
* (file) logging. */
init_logging();
@ -53,7 +52,7 @@ OpenBSD lacks POSIX shared memory support (shm_open() and friends)
start_argv = argv;
@@ -357,6 +365,7 @@ int main(int argc, char *argv[]) {
@@ -355,6 +363,7 @@ int main(int argc, char *argv[]) {
}
exit(EXIT_FAILURE);
@ -61,7 +60,7 @@ OpenBSD lacks POSIX shared memory support (shm_open() and friends)
} else if (strcmp(long_options[option_index].name, "shmlog-size") == 0 ||
strcmp(long_options[option_index].name, "shmlog_size") == 0) {
shmlog_size = atoi(optarg);
@@ -365,6 +374,7 @@ int main(int argc, char *argv[]) {
@@ -363,6 +372,7 @@ int main(int argc, char *argv[]) {
init_logging();
LOG("Limiting SHM log size to %d bytes\n", shmlog_size);
break;
@ -69,7 +68,7 @@ OpenBSD lacks POSIX shared memory support (shm_open() and friends)
} else if (strcmp(long_options[option_index].name, "restart") == 0) {
FREE(layout_path);
layout_path = sstrdup(optarg);
@@ -397,11 +407,13 @@ int main(int argc, char *argv[]) {
@@ -399,11 +409,13 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "\t--get-socketpath\n"
"\tRetrieve the i3 IPC socket path from X11, print it, then exit.\n");
fprintf(stderr, "\n");
@ -83,7 +82,7 @@ OpenBSD lacks POSIX shared memory support (shm_open() and friends)
fprintf(stderr, "If you pass plain text arguments, i3 will interpret them as a command\n"
"to send to a currently running i3 (like i3-msg). This allows you to\n"
"use nice and logical commands, such as:\n"
@@ -471,8 +483,10 @@ int main(int argc, char *argv[]) {
@@ -473,8 +485,10 @@ int main(int argc, char *argv[]) {
return 0;
}

View File

@ -1,70 +0,0 @@
$OpenBSD: patch-src_manage_c,v 1.9 2012/11/13 08:44:02 dcoppa Exp $
From a3f3d5670ca8ec0414805a4613a20d7b87b78630 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Thu, 27 Sep 2012 10:09:06 +0000
Subject: Bugfix: properly react to windows being unmapped before we can reparent
We need to verify that setting the event mask works, and we need
to include StructureNotify to get unmap events at any point in time.
From 372d47842e7d71fde0a194761bf77dceed6e724c Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Mon, 24 Sep 2012 21:57:58 +0000
Subject: Bugfix: Render workspaces created by assignments to use correct coordinates
Previously, i3 would send width=0, height=0 to windows which were
put on workspaces created by an assignment (that is, invisible
workspaces, which do not get rendered normally).
--- src/manage.c.orig Wed Sep 19 18:08:09 2012
+++ src/manage.c Thu Sep 27 12:50:16 2012
@@ -126,11 +126,22 @@ void manage_window(xcb_window_t window, xcb_get_window
uint32_t values[1];
/* Set a temporary event mask for the new window, consisting only of
- * PropertyChange. We need to be notified of PropertyChanges because the
- * client can change its properties *after* we requested them but *before*
- * we actually reparented it and have set our final event mask. */
- values[0] = XCB_EVENT_MASK_PROPERTY_CHANGE;
- xcb_change_window_attributes(conn, window, XCB_CW_EVENT_MASK, values);
+ * PropertyChange and StructureNotify. We need to be notified of
+ * PropertyChanges because the client can change its properties *after* we
+ * requested them but *before* we actually reparented it and have set our
+ * final event mask.
+ * We need StructureNotify because the client may unmap the window before
+ * we get to re-parent it.
+ * If this request fails, we assume the client has already unmapped the
+ * window between the MapRequest and our event mask change. */
+ values[0] = XCB_EVENT_MASK_PROPERTY_CHANGE |
+ XCB_EVENT_MASK_STRUCTURE_NOTIFY;
+ xcb_void_cookie_t event_mask_cookie =
+ xcb_change_window_attributes_checked(conn, window, XCB_CW_EVENT_MASK, values);
+ if (xcb_request_check(conn, event_mask_cookie) != NULL) {
+ LOG("Could not change event mask, the window probably already disappeared.\n");
+ goto out;
+ }
#define GET_PROPERTY(atom, len) xcb_get_property(conn, false, window, atom, XCB_GET_PROPERTY_TYPE_ANY, 0, len)
@@ -381,6 +392,22 @@ void manage_window(xcb_window_t window, xcb_get_window
/* Check if any assignments match */
run_assignments(cwindow);
+ /* If this window was put onto an invisible workspace (via assignments), we
+ * render this workspace. It wouldn't be rendered in our normal code path
+ * because only the visible workspaces get rendered.
+ *
+ * By rendering the workspace, we assign proper coordinates (read: not
+ * width=0, height=0) to the window, which is important for windows who
+ * actually use them to position their GUI elements, e.g. rhythmbox. */
+ if (ws && !workspace_is_visible(ws)) {
+ /* This is a bit hackish: we need to copy the content container's rect
+ * to the workspace, because calling render_con() on the content
+ * container would also take the shortcut and not render the invisible
+ * workspace at all. However, just calling render_con() on the
+ * workspace isn't enough either - it needs the rect. */
+ ws->rect = ws->parent->rect;
+ render_con(ws, true);
+ }
tree_render();
geom_out:

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-src_sighandler_c,v 1.3 2012/09/21 17:16:14 dcoppa Exp $
From 710478055881928c70f8c6c1411076eb06a92936 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Thu, 20 Sep 2012 08:55:03 +0000
Subject: spelling fix: s/succesfully/successfully/
--- src/sighandler.c.orig Fri Sep 21 13:40:19 2012
+++ src/sighandler.c Fri Sep 21 13:41:27 2012
@@ -112,12 +112,12 @@ static int backtrace(void) {
waitpid(pid_gdb, &status, 0);
- /* see if the backtrace was succesful or not */
+ /* see if the backtrace was successful or not */
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
DLOG("GDB did not run properly\n");
return -1;
} else if (stat(filename, &bt) == -1) {
- DLOG("GDB executed succesfully, but no backtrace was generated\n");
+ DLOG("GDB executed successfully, but no backtrace was generated\n");
return -1;
}
return 1;

View File

@ -1,24 +1,24 @@
$OpenBSD: patch-src_startup_c,v 1.1 2012/09/21 17:16:14 dcoppa Exp $
$OpenBSD: patch-src_startup_c,v 1.2 2012/12/13 12:10:14 dcoppa Exp $
On OpenBSD, time_t is an int.
--- src/startup.c.orig Thu Sep 20 14:25:49 2012
+++ src/startup.c Thu Sep 20 14:26:05 2012
@@ -74,7 +74,7 @@ static int _delete_startup_sequence(struct Startup_Seq
--- src/startup.c.orig Thu Dec 13 10:27:52 2012
+++ src/startup.c Thu Dec 13 10:28:36 2012
@@ -104,7 +104,7 @@ static int _prune_startup_sequences(void) {
*/
void startup_sequence_delete(struct Startup_Sequence *sequence) {
assert(sequence != NULL);
- DLOG("Deleting startup sequence %s, delete_at = %ld, current_time = %ld\n",
+ DLOG("Deleting startup sequence %s, delete_at = %d, current_time = %d\n",
sequence->id, sequence->delete_at, time(NULL));
/* Mark the given sequence for deletion in 30 seconds. */
sequence->delete_at = current_time + 30;
- DLOG("Will delete startup sequence %s at timestamp %ld\n",
+ DLOG("Will delete startup sequence %s at timestamp %d\n",
sequence->id, sequence->delete_at);
/* Unref the context, will be free()d */
@@ -246,7 +246,7 @@ void startup_monitor_event(SnMonitorEvent *event, void
/* Mark the given sequence for deletion in 30 seconds. */
time_t current_time = time(NULL);
sequence->delete_at = current_time + 30;
- DLOG("Will delete startup sequence %s at timestamp %ld\n",
+ DLOG("Will delete startup sequence %s at timestamp %d\n",
sequence->id, sequence->delete_at);
/* Traverse the list and delete everything which was marked for deletion 30
@@ -94,7 +94,7 @@ static int _delete_startup_sequence(struct Startup_Seq
if (current_time <= current->delete_at)
continue;
- DLOG("Deleting startup sequence %s, delete_at = %ld, current_time = %ld\n",
+ DLOG("Deleting startup sequence %s, delete_at = %d, current_time = %d\n",
current->id, current->delete_at, current_time);
/* Unref the context, will be free()d */
if (_prune_startup_sequences() == 0) {

View File

@ -1,45 +0,0 @@
$OpenBSD: patch-src_workspace_c,v 1.9 2012/11/13 08:44:02 dcoppa Exp $
From 507898484f2d4ccf7e1077cf8881d4655745ac8c Mon Sep 17 00:00:00 2001
From: Sascha Kruse <knopwob@googlemail.com>
Date: Wed, 03 Oct 2012 01:52:57 +0000
Subject: set workspace_layout in create_workspace_on_output
Otherwise i3 doesn't respect the workspace_layout setting.
From 81393c93c2810e098966fe4089f3c8ea09f9cbe6 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Sat, 10 Nov 2012 08:01:04 +0000
Subject: bugfix: fix workspace back_and_forth after displaying a scratchpad window
--- src/workspace.c.orig Wed Sep 19 18:08:09 2012
+++ src/workspace.c Tue Nov 13 08:56:30 2012
@@ -212,6 +212,7 @@ Con *create_workspace_on_output(Output *output, Con *c
ws->fullscreen_mode = CF_OUTPUT;
+ ws->workspace_layout = config.default_layout;
_workspace_apply_default_orientation(ws);
return ws;
@@ -339,11 +340,16 @@ static void _workspace_show(Con *workspace) {
/* Remember currently focused workspace for switching back to it later with
* the 'workspace back_and_forth' command.
* NOTE: We have to duplicate the name as the original will be freed when
- * the corresponding workspace is cleaned up. */
-
- FREE(previous_workspace_name);
- if (current)
- previous_workspace_name = sstrdup(current->name);
+ * the corresponding workspace is cleaned up.
+ * NOTE: Internal cons such as __i3_scratch (when a scratchpad window is
+ * focused) are skipped, see bug #868. */
+ if (current && !(current->name[0] == '_' && current->name[1] == '_')) {
+ FREE(previous_workspace_name);
+ if (current) {
+ previous_workspace_name = sstrdup(current->name);
+ DLOG("Setting previous_workspace_name = %s\n", previous_workspace_name);
+ }
+ }
workspace_reassign_sticky(workspace);

View File

@ -1,51 +1,10 @@
$OpenBSD: patch-src_x_c,v 1.9 2012/11/13 08:44:02 dcoppa Exp $
From e7a4580c5f5f895df2990dae0f26a8662d58d80f Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Mon, 29 Oct 2012 15:41:16 +0000
Subject: Bugfix: force rendering when the parent's orientation changed
Otherwise, the split indicator might not be refreshed even though
it should be.
From a082cf8c65225678af782187e4b6f3ba85a0701a Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Fri, 28 Sep 2012 17:46:50 +0000
Subject: Bugfix: Draw h-split indicator at the right position
$OpenBSD: patch-src_x_c,v 1.10 2012/12/13 12:10:14 dcoppa Exp $
OpenBSD lacks POSIX shared memory support (shm_open() and friends)
--- src/x.c.orig Wed Sep 19 18:08:09 2012
+++ src/x.c Fri Nov 2 14:34:47 2012
@@ -350,6 +350,7 @@ void x_draw_decoration(Con *con) {
p->con_deco_rect = con->deco_rect;
p->background = config.client.background;
p->con_is_leaf = con_is_leaf(con);
+ p->parent_orientation = con_orientation(parent);
if (con->deco_render_params != NULL &&
(con->window == NULL || !con->window->name_x_changed) &&
@@ -444,9 +445,9 @@ void x_draw_decoration(Con *con) {
TAILQ_PREV(con, nodes_head, nodes) == NULL &&
con->parent->type != CT_FLOATING_CON) {
xcb_change_gc(conn, con->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->indicator });
- if (con_orientation(con->parent) == HORIZ)
+ if (p->parent_orientation == HORIZ)
xcb_poly_fill_rectangle(conn, con->pixmap, con->pm_gc, 1, (xcb_rectangle_t[]){
- { r->width + br.width + br.x, 0, r->width, r->height + br.height } });
+ { r->width + br.width + br.x, br.y, r->width, r->height + br.height } });
else
xcb_poly_fill_rectangle(conn, con->pixmap, con->pm_gc, 1, (xcb_rectangle_t[]){
{ br.x, r->height + br.height + br.y, r->width - (2 * br.x), r->height } });
@@ -792,7 +793,7 @@ static void x_push_node_unmaps(Con *con) {
}
cookie = xcb_unmap_window(conn, con->frame);
- DLOG("unmapping container (serial %d)\n", cookie.sequence);
+ DLOG("unmapping container %p / %s (serial %d)\n", con, con->name, cookie.sequence);
/* we need to increase ignore_unmap for this container (if it
* contains a window) and for every window "under" this one which
* contains a window */
@@ -1037,8 +1038,10 @@ void x_set_i3_atoms(void) {
--- src/x.c.orig Wed Dec 12 00:08:17 2012
+++ src/x.c Thu Dec 13 09:45:54 2012
@@ -1057,8 +1057,10 @@ void x_set_i3_atoms(void) {
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_PID, XCB_ATOM_CARDINAL, 32, 1, &pid);
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_CONFIG_PATH, A_UTF8_STRING, 8,
strlen(current_configpath), current_configpath);

View File

@ -1,8 +1,9 @@
@comment $OpenBSD: PLIST,v 1.5 2012/05/09 11:56:49 dcoppa Exp $
@comment $OpenBSD: PLIST,v 1.6 2012/12/13 12:10:14 dcoppa Exp $
@conflict i3bar-<=0.6.21p1
@pkgpath x11/i3bar
@bin bin/i3
@bin bin/i3-config-wizard
bin/i3-dmenu-desktop
@bin bin/i3-input
bin/i3-migrate-config-to-v4
@bin bin/i3-msg