]> git.sur5r.net Git - i3/i3/commitdiff
Merge branch 'master' into next
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 24 Dec 2012 13:50:15 +0000 (14:50 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 24 Dec 2012 13:50:15 +0000 (14:50 +0100)
debian/changelog
docs/hacking-howto
docs/userguide
i3-dmenu-desktop
i3-dump-log/main.c
src/tree.c
src/workspace.c
src/x.c
testcases/complete-run.pl
testcases/new-test

index dcb966aed79ada9febb06ab3200d183efe0d2511..ebdfbcef3ec7369c850fa23966f225ab4b92a40a 100644 (file)
@@ -1,3 +1,9 @@
+i3-wm (4.4.1-0) unstable; urgency=low
+
+  * NOT YET RELEASED
+
+ -- Michael Stapelberg <stapelberg@debian.org>  Wed, 12 Dec 2012 00:23:32 +0100
+
 i3-wm (4.4-1) experimental; urgency=low
 
   * New upstream release
index 8a246efc3efc03c5220c20f6658799d3a0c2af79..05fc9cbda30dbf769abee9e6b5e44f8722710158 100644 (file)
@@ -971,7 +971,8 @@ apply to the branch, preserving your commit message and name:
 git format-patch origin
 -----------------------
 
-Just send us the generated file via email.
+Just send the generated file via email to the i3-discuss mailing list, see
+http://i3wm.org/contact/
 
 == Thought experiments
 
index 5880541c22a8ce462b9b98fd3d662216109ffe29..58dcf9acaffb0392622f259e5344bcb2e5ecf3ac 100644 (file)
@@ -1612,7 +1612,7 @@ bindsym $mod+r mode "resize"
 Often when in a multi-monitor environment, you want to quickly jump to a
 specific window. For example, while working on workspace 3 you may want to
 jump to your mail client to email your boss that you’ve achieved some
-important goal. Instead of figuring out how to navigate to your mailclient,
+important goal. Instead of figuring out how to navigate to your mail client,
 it would be more convenient to have a shortcut. You can use the +focus+ command
 with criteria for that.
 
index 20c7fbeaaec296aafe71becc8b60a40a506bf6d8..5bf77c2f56de9de6b75dec7cbc69ff45fa35cd95 100755 (executable)
@@ -35,7 +35,7 @@ my $result = GetOptions(
     'dmenu=s' => \$dmenu_cmd,
     'entry-type=s' => \$entry_type,
     'version' => sub {
-        say "dmenu-desktop 1.2 © 2012 Michael Stapelberg";
+        say "dmenu-desktop 1.3 © 2012 Michael Stapelberg";
         exit 0;
     },
     'help' => sub {
@@ -250,6 +250,11 @@ for my $app (keys %apps) {
 
     if ($entry_type eq 'command' || $entry_type eq 'both') {
         my ($command) = split(' ', $apps{$app}->{Exec});
+
+        # Don’t add “geany” if “Geany” is already present.
+        my @keys = map { lc } keys %choices;
+        next if lc(basename($command)) ~~ @keys;
+
         $choices{basename($command)} = $app;
     }
 }
@@ -451,7 +456,7 @@ command) and both (type = both).
 
 =head1 VERSION
 
-Version 1.2
+Version 1.3
 
 =head1 AUTHOR
 
index 48465c75718e696a44779638a5198f98c1e993dd..4a11d218298f7a2c0515f940b9586a55d3f0250c 100644 (file)
@@ -121,7 +121,7 @@ int main(int argc, char *argv[]) {
 
     struct stat statbuf;
 
-    /* NB: While we must never read, we need O_RDWR for the pthread condvar. */
+    /* NB: While we must never write, we need O_RDWR for the pthread condvar. */
     int logbuffer_shm = shm_open(shmname, O_RDWR, 0);
     if (logbuffer_shm == -1)
         err(EXIT_FAILURE, "Could not shm_open SHM segment for the i3 log (%s)", shmname);
@@ -129,7 +129,7 @@ int main(int argc, char *argv[]) {
     if (fstat(logbuffer_shm, &statbuf) != 0)
         err(EXIT_FAILURE, "stat(%s)", shmname);
 
-    /* NB: While we must never read, we need O_RDWR for the pthread condvar. */
+    /* NB: While we must never write, we need PROT_WRITE for the pthread condvar. */
     logbuffer = mmap(NULL, statbuf.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, logbuffer_shm, 0);
     if (logbuffer == MAP_FAILED)
         err(EXIT_FAILURE, "Could not mmap SHM segment for the i3 log");
index 7a5fb9f010081c7a24f28fbac1673b0471a4583b..c398ee1d36f6722a35fe4b77fb569ea3350d86d4 100644 (file)
@@ -251,15 +251,28 @@ bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent, bool
         free(con->window);
     }
 
-    /* kill the X11 part of this container */
-    x_con_kill(con);
+    Con *ws = con_get_workspace(con);
+
+    /* Figure out which container to focus next before detaching 'con'. */
+    if (con_is_floating(con)) {
+        if (con == focused) {
+            DLOG("This is the focused container, i need to find another one to focus. I start looking at ws = %p\n", ws);
+            next = con_next_focused(parent);
+
+            dont_kill_parent = true;
+            DLOG("Alright, focusing %p\n", next);
+        } else {
+            next = NULL;
+        }
+    }
 
+    /* Detach the container so that it will not be rendered anymore. */
     con_detach(con);
 
     /* disable urgency timer, if needed */
     if (con->urgency_timer != NULL) {
         DLOG("Removing urgency timer of con %p\n", con);
-        workspace_update_urgent_flag(con_get_workspace(con));
+        workspace_update_urgent_flag(ws);
         ev_timer_stop(main_loop, con->urgency_timer);
         FREE(con->urgency_timer);
     }
@@ -270,21 +283,24 @@ bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent, bool
         con_fix_percent(parent);
     }
 
+    /* Render the tree so that the surrounding containers take up the space
+     * which 'con' does no longer occupy. If we don’t render here, there will
+     * be a gap in our containers and that could trigger an EnterNotify for an
+     * underlying container, see ticket #660.
+     *
+     * Rendering has to be avoided when dont_kill_parent is set (when
+     * tree_close calls itself recursively) because the tree is in a
+     * non-renderable state during that time. */
+    if (!dont_kill_parent)
+        tree_render();
+
+    /* kill the X11 part of this container */
+    x_con_kill(con);
+
     if (con_is_floating(con)) {
-        Con *ws = con_get_workspace(con);
         DLOG("Container was floating, killing floating container\n");
         tree_close(parent, DONT_KILL_WINDOW, false, (con == focused));
         DLOG("parent container killed\n");
-        if (con == focused) {
-            DLOG("This is the focused container, i need to find another one to focus. I start looking at ws = %p\n", ws);
-            /* go down the focus stack as far as possible */
-            next = con_descend_focused(ws);
-
-            dont_kill_parent = true;
-            DLOG("Alright, focusing %p\n", next);
-        } else {
-            next = NULL;
-        }
     }
 
     free(con->name);
index 4ccf421c09f1b429e34152b175e395558b77269e..5a0913bfcc77852c1084fe2f2908097000714b8c 100644 (file)
@@ -397,7 +397,7 @@ static void _workspace_show(Con *workspace) {
      * 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] == '_')) {
+    if (current && !con_is_internal(current)) {
         FREE(previous_workspace_name);
         if (current) {
             previous_workspace_name = sstrdup(current->name);
diff --git a/src/x.c b/src/x.c
index 8f0ae37d538984efcf59dd5395d7f94c016c2ac2..3a658a728acc593b85d262daf2ef34a32d24faba 100644 (file)
--- a/src/x.c
+++ b/src/x.c
@@ -465,7 +465,7 @@ void x_draw_decoration(Con *con) {
     xcb_rectangle_t drect = { con->deco_rect.x, con->deco_rect.y, con->deco_rect.width, con->deco_rect.height };
     xcb_poly_fill_rectangle(conn, parent->pixmap, parent->pm_gc, 1, &drect);
 
-    /* 5: draw two unconnected lines in border color */
+    /* 5: draw two unconnected horizontal lines in border color */
     xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->border });
     Rect *dr = &(con->deco_rect);
     int deco_diff_l = 2;
@@ -539,19 +539,21 @@ after_title:
      * the right border again after rendering the text (and the unconnected
      * lines in border color). */
 
-    /* Draw a separator line after every tab (except the last one), so that
-     * tabs can be easily distinguished. */
-    if (parent->layout == L_TABBED && TAILQ_NEXT(con, nodes) != NULL) {
+    /* Draw a 1px separator line before and after every tab, so that tabs can
+     * be easily distinguished. */
+    if (parent->layout == L_TABBED) {
         xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->border });
     } else {
         xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->background });
     }
-    xcb_poly_line(conn, XCB_COORD_MODE_ORIGIN, parent->pixmap, parent->pm_gc, 4,
+    xcb_poly_line(conn, XCB_COORD_MODE_ORIGIN, parent->pixmap, parent->pm_gc, 6,
                   (xcb_point_t[]){
+                      { dr->x + dr->width, dr->y },
+                      { dr->x + dr->width, dr->y + dr->height },
                       { dr->x + dr->width - 1, dr->y },
                       { dr->x + dr->width - 1, dr->y + dr->height },
-                      { dr->x + dr->width - 2, dr->y },
-                      { dr->x + dr->width - 2, dr->y + dr->height }
+                      { dr->x, dr->y + dr->height },
+                      { dr->x, dr->y },
                   });
 
     xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->border });
index b812180270aaa75866fa7ca3cdb930218cde0cc8..560dd4c3de0bc21f6c4126b7f152ef4b424d89fb 100755 (executable)
@@ -1,10 +1,11 @@
 #!/usr/bin/env perl
 # vim:ts=4:sw=4:expandtab
-# © 2010-2011 Michael Stapelberg and contributors
+# © 2010-2012 Michael Stapelberg and contributors
 package complete_run;
 use strict;
 use warnings;
 use v5.10;
+use utf8;
 # the following are modules which ship with Perl (>= 5.10):
 use Pod::Usage;
 use Cwd qw(abs_path);
@@ -29,6 +30,9 @@ use AnyEvent::I3 qw(:all);
 use X11::XCB::Connection;
 use JSON::XS; # AnyEvent::I3 depends on it, too.
 
+binmode STDOUT, ':utf8';
+binmode STDERR, ':utf8';
+
 # Close superfluous file descriptors which were passed by running in a VIM
 # subshell or situations like that.
 AnyEvent::Util::close_all_fds_except(0, 1, 2);
@@ -78,7 +82,7 @@ my @binaries = qw(
                );
 
 foreach my $binary (@binaries) {
-    die "$binary executable not found" unless -e $binary;
+    die "$binary executable not found, did you run “make”?" unless -e $binary;
     die "$binary is not an executable" unless -x $binary;
 }
 
index 2849301e9b2ccb01007e8254a04fb2a9e878922c..c2546158267fa2b5a49bf75579b936fea7e9dd7a 100755 (executable)
@@ -79,6 +79,7 @@ font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
 fake-outputs 1024x768+0+0,1024x768+1024+0
 EOT
 
+my $pid = launch_with_config($config);
 
 
 exit_gracefully($pid);