+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
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
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.
'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 {
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;
}
}
=head1 VERSION
-Version 1.2
+Version 1.3
=head1 AUTHOR
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);
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");
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);
}
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);
* 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);
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;
* 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 });
#!/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);
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);
);
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;
}
fake-outputs 1024x768+0+0,1024x768+1024+0
EOT
+my $pid = launch_with_config($config);
exit_gracefully($pid);