Re: [i3] Call for testing for the 4.8 release
>"MS" == Michael Stapelberg writes: MS> Thanks. Next time, can you submit it to http://cr.i3wm.org/ directly MS> please? Sure, sorry for the inconvenience. -- Marcus
Re: [i3] Call for testing for the 4.8 release
>>>>>"MS" == Michael Stapelberg writes: MS> I want to release i3 v4.8 soon, so here is a call for testing. On OS X, I see a ton of "macro redefined" warnings when compiling src/log.c. The redefinitions are caused by include/queue.h that exists as a system header /usr/include/sys/queue.h on OS X. I've attached a patch that moves the __APPLE__ specific include of sysctl.h below the include of i3.h. This way, the compiler considers the redefinitions to come from a system header and does not show the warnings. Also, types.h is no longer needed on OS X. With this patch i3 builds cleanly and works fine for me. -- Marcus >From 349d7b2d1b603ce1ea54e275776505bd2a980e16 Mon Sep 17 00:00:00 2001 From: Marcus Crestani Date: Wed, 11 Jun 2014 20:53:22 +0200 Subject: [PATCH] Include sys/sysctl.h after i3.h to prevent redefinition warnings caused by queue.h on OS X. --- src/log.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/log.c b/src/log.c index ec44f3a..1014908 100644 --- a/src/log.c +++ b/src/log.c @@ -21,10 +21,6 @@ #include #include #include -#if defined(__APPLE__) -#include -#include -#endif #include "util.h" #include "log.h" @@ -32,6 +28,10 @@ #include "libi3.h" #include "shmlog.h" +#if defined(__APPLE__) +#include +#endif + static bool debug_logging = false; static bool verbose = false; static FILE *errorfile; -- 1.6.4.2
Re: [i3] segfaults with libxcb-1.10
>>>>>"MC" == Marcus Crestani writes: MC> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread MC> 0 ??? 0x0001 0 + 4294967296 MC> 1 libxcb.1.dylib 0x000110152f24 get_socket_back + 139 MC> 2 libxcb.1.dylib 0x0001101534ae xcb_send_request + 935 MC> 3 libxcb.1.dylib 0x000110159784 xcb_intern_atom + 197 MC> 4 libstartup-notification-1.0.dylib 0x00010fd3d37e sn_xcb_display_new + 78 MC> 5 i3 0x00010f6d4e30 main + 4000 MC> 6 libdyld.dylib 0x7fff906185fd start + 1 MC> Has anybody else seen this problem with libxcb-1.10 on OS X or other MC> platforms? Is this most likely caused by XQuartz, libxcb, libsn, or i3? Since nobody seems to have run into this problem, I started digging deeper. The problem was caused by my setup, I realized that I was linking against libsn that itself was linking against a rather old libxcb-1.6. Rebuilding libsn and linking it against libxcb-1.10 fixed the problem. Sorry for the noise. -- Marcus
[i3] segfaults with libxcb-1.10
I am using i3 on OS X 10.9.3 as the window manager under XQuartz. Newest XQuartz 2.7.6 updated (amongst many other parts) libxcb to version 1.10 (previous versions came with libxcb-1.9.1). With libxcb-1.10, i3 (latest release, master, and next) segfaults during startup in libxcb: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 ??? 0x0001 0 + 4294967296 1 libxcb.1.dylib 0x000110152f24 get_socket_back + 139 2 libxcb.1.dylib 0x0001101534ae xcb_send_request + 935 3 libxcb.1.dylib 0x000110159784 xcb_intern_atom + 197 4 libstartup-notification-1.0.dylib 0x00010fd3d37e sn_xcb_display_new + 78 5 i3 0x00010f6d4e30 main + 4000 6 libdyld.dylib 0x7fff906185fd start + 1 Has anybody else seen this problem with libxcb-1.10 on OS X or other platforms? Is this most likely caused by XQuartz, libxcb, libsn, or i3? Thanks, -- Marcus
Re: [i3] [i3 announcement] i3 v4.5 released
>>>>>"MS" == Michael Stapelberg writes: MS> I just released i3 v4.5. Here are the release notes: I needed to add YAJL_CFLAGS to i3-msg.mk to be able to build under latest Mac OS X, see attached patch. Thanks a lot for the release! -- Marcus >From bfaa4134f8c3f01c03a65f8b3df5f0b853cbc593 Mon Sep 17 00:00:00 2001 From: Marcus Crestani Date: Thu, 14 Mar 2013 10:10:38 +0100 Subject: [PATCH] Add YAJL_CFLAGS to i3-msg.mk. --- i3-msg/i3-msg.mk |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/i3-msg/i3-msg.mk b/i3-msg/i3-msg.mk index b1ba7b4..fda56da 100644 --- a/i3-msg/i3-msg.mk +++ b/i3-msg/i3-msg.mk @@ -4,7 +4,7 @@ CLEAN_TARGETS += clean-i3-msg i3_msg_SOURCES := $(wildcard i3-msg/*.c) i3_msg_HEADERS := $(wildcard i3-msg/*.h) -i3_msg_CFLAGS = $(XCB_CFLAGS) $(PANGO_CFLAGS) +i3_msg_CFLAGS = $(XCB_CFLAGS) $(PANGO_CFLAGS) $(YAJL_CFLAGS) i3_msg_LIBS = $(XCB_LIBS) $(YAJL_LIBS) i3_msg_OBJECTS := $(i3_msg_SOURCES:.c=.o) -- 1.6.4.2
Re: [i3] Fix i3-dump-log on OS X
>"MS" == Michael Stapelberg writes: MS> Did they break this in newer versions or is your patch wrong? O_TRUNK is documented and exists but it is not implemented. shm_open with O_TRUNK yields shm_open: invalid argument AFAIK, O_TRUNK never worked on OS X. -- Marcus
[i3] Fix i3-dump-log on OS X (was: Workspace 1 does not respect tabbed layout setting)
>>>>>"MC" == Marcus Crestani writes: MC> (Unfortunately I am not able to provide more debugging information, MC> i3-dump-log seems not to work on OS X. i3-dump-log: Could not shm_open MC> SHM segment for the i3 log (/i3-log-32571): No such file or directory). OS X does not support O_TRUNC in shm_open. Attached patch fixes i3-dump-log on OS X. -- Marcus >From 7d0011e35a48b630edfe1345d7de21f0ff25b737 Mon Sep 17 00:00:00 2001 From: Marcus Crestani Date: Wed, 3 Oct 2012 10:38:20 +0200 Subject: [PATCH] Make i3-dump-log work on OS X: shm_open does not support O_TRUNC in OS X. --- src/log.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/log.c b/src/log.c index 16fa0be..bd3be3e 100644 --- a/src/log.c +++ b/src/log.c @@ -101,14 +101,16 @@ void init_logging(void) { #if defined(__APPLE__) int mib[2] = { CTL_HW, HW_MEMSIZE }; size_t length = sizeof(long long); + int shm_open_oflags = O_RDWR | O_CREAT; sysctl(mib, 2, &physical_mem_bytes, &length, NULL, 0); #else + int shm_open_oflags = O_RDWR | O_CREAT | O_TRUNC; physical_mem_bytes = (long long)sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE); #endif logbuffer_size = min(physical_mem_bytes * 0.01, shmlog_size); sasprintf(&shmlogname, "/i3-log-%d", getpid()); -logbuffer_shm = shm_open(shmlogname, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE); +logbuffer_shm = shm_open(shmlogname, shm_open_oflags, S_IREAD | S_IWRITE); if (logbuffer_shm == -1) { ELOG("Could not shm_open SHM segment for the i3 log: %s\n", strerror(errno)); return; -- 1.6.4.2
Re: [i3] Workspace 1 does not respect tabbed layout setting
>"SK" == Sascha Kruse writes: SK> I think Marcus hasn't created the bug report yet SK> (or I just haven't found it) so I'm posting this here. After Michael's fixes to the new bug submission system, I was just able to submit the report: http://bugs.i3wm.org/report/ticket/835 SK> A proposed patch is attached. It explicitly sets workspace_layout in SK> create_workspace_on_output(). The patch fixes the problem for me! Thanks for the quick action! -- Marcus
Re: [i3] Workspace 1 does not respect tabbed layout setting
>"MS" == Michael Stapelberg writes: MS> Could you please retry now (hopefully the last time)? :-) I've just tried and it worked this time. Here is the ticket: http://bugs.i3wm.org/report/ticket/835 -- Marcus
Re: [i3] Workspace 1 does not respect tabbed layout setting
>"MS" == Michael Stapelberg writes: MS> Thanks for the report. I tried it in Firefox and it works for me. Do you MS> have cookies disabled? No, I have cookies enabled. MS> If not, could you still retry (I’ve got some additional logging MS> enabled now)? I just did, same error. -- Marcus
Re: [i3] Workspace 1 does not respect tabbed layout setting
>"MS" == Michael Stapelberg writes: MS> Could you file a ticket for it at http://bugs-beta.i3wm.org/ please? I tried, but the after submitting the first form I see: New i3 ticket: Internal error There was an internal error in i3-new-ticket. Your data has been saved in a crash report and the developers have been notified via email. A ticket with the data you submitted will be created manually. The error message of the program is: Could not save session: securecookie: the value could not be encoded I've tried it twice, both times with the same result. -- Marcus
[i3] Workspace 1 does not respect tabbed layout setting
I have found a regression in i3. I run i3 on OS X 10.8.2 and XQuartz 2.7.4. In my configuration, I have: workspace_layout tabbed However, when I start a fresh i3 version 4.3-19-g01ce4bb (2012-09-29, branch "master"), i3 does not seem to be respect the workspace_layout setting. When I open two terminals, they are not presented in tabbed layout, but instead in splith: +---+---+ | terminal 1| terminal 2| +---+---+ | | | | | | | | | The problem only occurs in workspace 1, however. When I switch to another workspace, say workspace 2, and I open two terminals, they are tabbed as I would expect them to be: +---+---+ | terminal 1| terminal 2| +---+---+ | | | | | | Interestingly, when I close all the windows in workspace 1, switch to workspace 2, open two windows, then switch back to workspace 1 and open two windows there, then they are tabbed as well. So, workspace 1 realizes that it should use the tabbed layout only after I've used it successfully in workspace 2. It seems that this problem was introduced recently. When I run i3-4.2 everything works as I expect it to work. The release version of i3-4.3 has the problem as well as today's HEAD of the git repository. (Unfortunately I am not able to provide more debugging information, i3-dump-log seems not to work on OS X. i3-dump-log: Could not shm_open SHM segment for the i3 log (/i3-log-32571): No such file or directory). Any ideas what could be the cause of my problem? I am happy to provide more information or test out things if needed. Thanks, -- Marcus
Re: [i3] Call for testing
>"MS" == Michael Stapelberg writes: MS> Thanks, I’ve changed it in the makefile. Your patch didn’t apply at all MS> here, also I don’t even have the commit in the "From" line. Is your MS> working copy really tracking upstream or did it diverge sometime and you MS> merged it back together? I mailed a format-patch relative to origin/next: git format-patch origin/next MS> cmdparse is a file which doesn’t exist anymore in i3’s MS> code. Unfortunately, the makefile redesign removed it from the clean MS> target, which is why you are seeing these build errors. I pushed a fix MS> for that just now. Are there any errors left? No more errors left: The code builds successfully. Thanks! -- Marcus
Re: [i3] Call for testing
cmdparse.y:688:51: error: too few arguments to function call, expected 4, have 2 con_move_to_workspace(current->con, ws); ~~~~~ ^ include/con.h:165:1: note: 'con_move_to_workspace' declared here void con_move_to_workspace(Con *con, Con *workspace, bool fix_coordinates, bool dont_warp); ^ 6 warnings and 7 errors generated. make: *** [src/cmdparse.tab.o] Error 1 -- Marcus >From 51cf20918bc65dc59ea8062da3f36f36d68aab80 Mon Sep 17 00:00:00 2001 From: Marcus Crestani Date: Sun, 9 Sep 2012 10:25:26 +0200 Subject: [PATCH] readlink -f does not work on OS X, use pwd -P instead. --- src/i3.mk |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i3.mk b/src/i3.mk index b5c7c47..abea072 100644 --- a/src/i3.mk +++ b/src/i3.mk @@ -21,13 +21,13 @@ endif i3_OBJECTS := $(i3_SOURCES_GENERATED:.c=.o) $(i3_SOURCES:.c=.o) -# The basename/readlink calls are for canonicalizing the path: Instead +# The basename/pwd calls are for canonicalizing the path: Instead # of src/main.c, we will see something like ../i3-4.2/src/main.c in # debugger backtraces, making it clearer which code belongs to i3 and # which code doesn’t. # We only do this for src/ since all the other subdirectories contain i3 in # their name already. -canonical_path := ../$(shell basename $(shell readlink -f .)) +canonical_path := ../$(shell basename $(shell pwd -P)) include/all.h.pch: $(i3_HEADERS) echo "[i3] PCH all.h" -- 1.6.4.2
Re: [i3] building i3 wm on os X
>"AR" == Armin Roehrl writes: AR> Unfortunately a simply make complains about missing libsn/sn-launcher.h AR> Any help would be greatly appreciated. You need to install all the libraries i3 depends upon, see the file DEPENDS in the source code's top level directory. -- Marcus
Re: [i3] building i3 wm on os X
>"AR" == Armin Roehrl writes: AR> did anybody succeed building i3 wm on os X? For the last couple releases, I've added some patches to i3 to have it compile on OS X. A simple `make' should work just fine. Are you running into problems? -- Marcus
Re: [i3] Change focus in i3-tree
>"MS" == Michael Stapelberg writes: MS> If you want me to remember it for later, please file an enhancement MS> ticket at our bugtracker :). I've done that. Thanks a lot! -- Marcus
Re: [i3] Change focus in i3-tree
Thanks for the quick reply! >"MS" == Michael Stapelberg writes: MS> Yes, the command looks like this: "focus parent; focus left" :). I should've tried this syntax instead of all the variations I've actually tried that didn't work... How to sequence commands would be a great addition to the User's Guide. Also, couldn't i3-migrate-config-to-v4.pl translate the 'with container' commands to the navigate parent equivalent (i.e. "wch" -> "focus parent; focus left"), instead of complaining "'with container' commands are obsolete in 4.x"? Another question: Is there a way to prevent the focus commands from moving focus to outside the parent's subtree? Let's assume I have this configuration: h-split / \ tabbed tabbed /\ /\ t1t2t3t4 Starting from t1 with "focus right" moves focus to t2, another "focus right" moves focus to t3. What I'd like to see is that a "focus right" from t2 cycles focus back to t1 instead. Is this possible? By the way, "focus left" from t1 moves the focus to t2, what I see as the "correct" behaviour, since focus stays within the parent's subtree, but with the above described behaviour I would expect it to move the focus to t4. This differing behaviour puzzles me. -- Marcus
[i3] Change focus in i3-tree
I have trouble achieving certain focus change functionality in i3-tree-pr4 that I use all the time in i3-v3. My screen shows something like this: +-+-+ |=t1===| t2 | t3 |=t4===+ +-+-+ | $ | $ | | | | | | | Two containers, each tabbed, one on the left hand side with two terminal windows (t1 and t2, where t1 is in front, denoted by ===) and one on the right hand side with two more terminal windows (t3 and t4, where t4 is in front, also denoted by ===). Focus is on t1. In i3-v3, I can hit the key that I've configured to `wcl' to move focus from t1 to t4 directly, and `wcj' to move focus from t4 to t1 directly. In i3-tree, the "with container" commands are obsolete, so the `wc*' commands do not exist anymore. How can I achieve the described focus change in i3-tree? In i3-tree, it seems to me that I only can `focus left' and `focus right'. Coming from t1, a `focus right' key brings t2 to front, then moves over to t3 and brings it to front, then moves to t4, but t1 is no longer visible: +-+-+ | t1 |=t2===| t3 |=t4===+ +-+-+ | $ | $ | | | | | | | Maybe the right way to think about this focus navigation in i3-tree is something like "focus left parent" respectively "focus right parent"? Is there a way to bind a key to a sequence of commands, eg. `focus parent; focus left'? What am I missing? -- Marcus