]> git.sur5r.net Git - i3/i3/log
i3/i3
12 years agoBugfix: Respect WM_HINTS.input for WM_TAKE_FOCUS clients
Michael Stapelberg [Wed, 18 Jan 2012 19:16:57 +0000 (19:16 +0000)]
Bugfix: Respect WM_HINTS.input for WM_TAKE_FOCUS clients

This fixes problems with Qt apps (like Quassel) and apparently Eclipse since
the last commit.

12 years agoMerge branch 'fix-take-focus'
Michael Stapelberg [Tue, 17 Jan 2012 23:34:52 +0000 (23:34 +0000)]
Merge branch 'fix-take-focus'

12 years agoBugfix: Either use SetInputFocus *or* send WM_TAKE_FOCUS, not both
Michael Stapelberg [Tue, 17 Jan 2012 23:33:33 +0000 (23:33 +0000)]
Bugfix: Either use SetInputFocus *or* send WM_TAKE_FOCUS, not both

This fixes problems with the Oracle JRE7, which checks the current focus after
receiving WM_TAKE_FOCUS and just does nothing when the focus is on one of its
windows. Hopefully it doesn’t introduce any regressions :).

12 years agoMerge branch 'fix-floating-assign'
Michael Stapelberg [Sun, 8 Jan 2012 12:30:23 +0000 (12:30 +0000)]
Merge branch 'fix-floating-assign'

12 years agoBugfix: Fix assignments of floating windows to (yet) unused workspaces (Thanks zeus)
Michael Stapelberg [Sun, 8 Jan 2012 12:28:49 +0000 (12:28 +0000)]
Bugfix: Fix assignments of floating windows to (yet) unused workspaces (Thanks zeus)

The problem was that the workspace was considered empty for a brief period of
time when entering floating mode. This happened when you assigned Gimp to a
workspace which is not in use yet.

12 years agoMerge branch 'fix-assignment-open'
Michael Stapelberg [Sat, 7 Jan 2012 18:50:43 +0000 (18:50 +0000)]
Merge branch 'fix-assignment-open'

12 years agoBugfix: Open new windows in the correct place when assignments match (+test) (Thanks...
Michael Stapelberg [Sat, 7 Jan 2012 18:50:00 +0000 (18:50 +0000)]
Bugfix: Open new windows in the correct place when assignments match (+test) (Thanks Don)

12 years agoMerge branch 'fix-fullscreen-move'
Michael Stapelberg [Sat, 7 Jan 2012 18:19:48 +0000 (18:19 +0000)]
Merge branch 'fix-fullscreen-move'

12 years agoBugfix: Don’t lose focus on fullscreen windows when another window gets moved to...
Michael Stapelberg [Sat, 7 Jan 2012 18:18:36 +0000 (18:18 +0000)]
Bugfix: Don’t lose focus on fullscreen windows when another window gets moved to that workspace (+test) (Thanks rami)

Fixes: #606
12 years agodebian: re-add build-indep/build-arch targets to debian/rules 4.1.1
Michael Stapelberg [Sat, 24 Dec 2011 15:24:00 +0000 (16:24 +0100)]
debian: re-add build-indep/build-arch targets to debian/rules

12 years agobump manpage version
Michael Stapelberg [Sat, 24 Dec 2011 15:10:22 +0000 (16:10 +0100)]
bump manpage version

12 years agoAlso check for empty $PAGER/$VISUAL/$EDITOR in i3-sensible-{editor,pager}
Michael Stapelberg [Sat, 19 Nov 2011 14:10:39 +0000 (14:10 +0000)]
Also check for empty $PAGER/$VISUAL/$EDITOR in i3-sensible-{editor,pager}

12 years agoi3-sensible-terminal: check $TERMINAL to not call 'which' without parameters (Thanks...
Michael Stapelberg [Sat, 19 Nov 2011 14:08:18 +0000 (14:08 +0000)]
i3-sensible-terminal: check $TERMINAL to not call 'which' without parameters (Thanks Fandekasp)

12 years agoadd release notes for v4.1.1
Michael Stapelberg [Sat, 24 Dec 2011 14:59:04 +0000 (15:59 +0100)]
add release notes for v4.1.1

12 years agoupdate debian/changelog
Michael Stapelberg [Sat, 24 Dec 2011 14:58:58 +0000 (15:58 +0100)]
update debian/changelog

12 years agoMerge branch 'doc-fixes'
Michael Stapelberg [Sat, 24 Dec 2011 14:37:03 +0000 (15:37 +0100)]
Merge branch 'doc-fixes'

12 years agoFix a few spelling typos
Miguel de Val-Borro [Fri, 23 Dec 2011 15:29:26 +0000 (16:29 +0100)]
Fix a few spelling typos

12 years agos/xwininfo/xprop (Thanks Miguel)
Michael Stapelberg [Sat, 24 Dec 2011 14:36:11 +0000 (15:36 +0100)]
s/xwininfo/xprop (Thanks Miguel)

12 years agoFix typo in keyboard binding example in the user guide
Miguel de Val-Borro [Fri, 23 Dec 2011 11:56:26 +0000 (12:56 +0100)]
Fix typo in keyboard binding example in the user guide

12 years agoMerge branch 'fix-float-close'
Michael Stapelberg [Tue, 20 Dec 2011 18:44:23 +0000 (18:44 +0000)]
Merge branch 'fix-float-close'

12 years agoBugfix: Don’t close workspace when there are still floating windows on it (Thanks...
Michael Stapelberg [Tue, 20 Dec 2011 18:43:52 +0000 (18:43 +0000)]
Bugfix: Don’t close workspace when there are still floating windows on it (Thanks noxxun) (+test)

Fixes: #595
12 years agoMerge branch 'fix-temp-path'
Michael Stapelberg [Sun, 18 Dec 2011 17:59:56 +0000 (17:59 +0000)]
Merge branch 'fix-temp-path'

12 years agoCreate a secure temp path instead of a predictable one (Thanks Han)
Michael Stapelberg [Sun, 18 Dec 2011 17:53:21 +0000 (17:53 +0000)]
Create a secure temp path instead of a predictable one (Thanks Han)

With this commit, i3 will now use either $XDG_RUNTIME_DIR/i3 (XDG_RUNTIME_DIR
is only writable by the user, so this is not a problem) or a secure temporary
location in /tmp, following the pattern /tmp/i3-<user>.XXXXXX

12 years agoMerge branch 'fix-floating-move'
Michael Stapelberg [Sun, 18 Dec 2011 17:24:58 +0000 (17:24 +0000)]
Merge branch 'fix-floating-move'

12 years agoBugfix: Correctly check boundaries and reassign floating windows when moving (Thanks...
Michael Stapelberg [Sun, 18 Dec 2011 17:24:27 +0000 (17:24 +0000)]
Bugfix: Correctly check boundaries and reassign floating windows when moving (Thanks xpt)

Fixes: #592
12 years agoMerge branch 'fix-float-resize'
Michael Stapelberg [Sun, 18 Dec 2011 15:18:47 +0000 (15:18 +0000)]
Merge branch 'fix-float-resize'

12 years agoBugfix: Fix floating resize for floating split containers (+test)
Michael Stapelberg [Sun, 18 Dec 2011 15:18:20 +0000 (15:18 +0000)]
Bugfix: Fix floating resize for floating split containers (+test)

Fixes: #588
12 years agoMerge branch 'fix-bindsym'
Michael Stapelberg [Sat, 17 Dec 2011 22:34:55 +0000 (22:34 +0000)]
Merge branch 'fix-bindsym'

12 years agokeygrabbing: only look in the appropriate columns when resolving keysyms
Michael Stapelberg [Sat, 17 Dec 2011 22:31:21 +0000 (22:31 +0000)]
keygrabbing: only look in the appropriate columns when resolving keysyms

Fixes: #585
This commit fixes the problem of i3 wrongly grabbing/interpreting (!) some key
bindings. Basically, when you have, say, "bindsym Mod1+4 workspace 4", but you
also have "bindsym Mod1+semicolon focus right" (both are default), and your
keyboard layout has semicolon on Mode_switch + 4, the "workspace 4" keybinding
was shadowed by the "focus right" keybinding, because that also resolves to
semicolon.

So, from now on, i3 will only consider column 0 and 1 for normal bindings and
column 2 and 3 for bindings using Mode_switch (columns as seen in xmodmap
-pke).

12 years agore-indent translate_keysyms()
Michael Stapelberg [Sat, 17 Dec 2011 22:28:28 +0000 (22:28 +0000)]
re-indent translate_keysyms()

12 years agoMerge branch 'fix-resize-focus'
Michael Stapelberg [Sat, 17 Dec 2011 18:47:53 +0000 (18:47 +0000)]
Merge branch 'fix-resize-focus'

12 years agoBugfix: Don’t change focus after (graphical) resizing
Michael Stapelberg [Sat, 17 Dec 2011 18:47:29 +0000 (18:47 +0000)]
Bugfix: Don’t change focus after (graphical) resizing

12 years agoMerge branch 'fix-configure-request'
Michael Stapelberg [Sat, 17 Dec 2011 17:16:35 +0000 (17:16 +0000)]
Merge branch 'fix-configure-request'

12 years agoBugfix: Ignore ConfigureRequests with out-of-bound coordinates (+test)
Michael Stapelberg [Sat, 17 Dec 2011 17:15:52 +0000 (17:15 +0000)]
Bugfix: Ignore ConfigureRequests with out-of-bound coordinates (+test)

JDownloader seems to use these for its captcha popups when focus is not on the
same workspace, for some weird reason.

12 years agoMerge branch 'fix-fullscreen-focus'
Michael Stapelberg [Sat, 17 Dec 2011 15:28:25 +0000 (15:28 +0000)]
Merge branch 'fix-fullscreen-focus'

12 years agoBugfix: Disallow focusing other windows when in fullscreen mode (Thanks aksr)
Michael Stapelberg [Sat, 17 Dec 2011 15:21:43 +0000 (15:21 +0000)]
Bugfix: Disallow focusing other windows when in fullscreen mode (Thanks aksr)

Fixes: #579
12 years agoupdate debian changelog
Michael Stapelberg [Sat, 17 Dec 2011 14:30:40 +0000 (14:30 +0000)]
update debian changelog

12 years agoMerge branch 'fix-mark'
Michael Stapelberg [Sat, 17 Dec 2011 14:22:31 +0000 (14:22 +0000)]
Merge branch 'fix-mark'

12 years agoBugfix: Fix setting the same mark repeatedly on different windows (+test)
Michael Stapelberg [Sat, 17 Dec 2011 14:19:44 +0000 (14:19 +0000)]
Bugfix: Fix setting the same mark repeatedly on different windows (+test)

Fixes: #582
12 years agoMerge branch 'fix-floatingmod-deco'
Michael Stapelberg [Sat, 17 Dec 2011 13:55:42 +0000 (13:55 +0000)]
Merge branch 'fix-floatingmod-deco'

12 years agoBugfix: Make resizing work when pressing floating_modifier + right mouse button on...
Michael Stapelberg [Sat, 17 Dec 2011 13:55:16 +0000 (13:55 +0000)]
Bugfix: Make resizing work when pressing floating_modifier + right mouse button on window decorations

Fixes: #583
12 years agoMerge branch 'fix-mod-resizing'
Michael Stapelberg [Sat, 17 Dec 2011 12:21:09 +0000 (12:21 +0000)]
Merge branch 'fix-mod-resizing'

12 years agoBugfix: Make resizing of tiling windows with floating_modifier use absolute coordinates
Michael Stapelberg [Sat, 17 Dec 2011 12:20:27 +0000 (12:20 +0000)]
Bugfix: Make resizing of tiling windows with floating_modifier use absolute coordinates

Fixes: #580
12 years agoMerge branch 'fix-var-tabs'
Michael Stapelberg [Sat, 17 Dec 2011 11:18:17 +0000 (11:18 +0000)]
Merge branch 'fix-var-tabs'

12 years agoBugfix: Skip leading whitespace in variable assignments (Thanks ben)
Michael Stapelberg [Sat, 17 Dec 2011 11:16:34 +0000 (11:16 +0000)]
Bugfix: Skip leading whitespace in variable assignments (Thanks ben)

Fixes: #577
12 years agoMerge branch 'noworkarea'
Michael Stapelberg [Wed, 30 Nov 2011 20:34:49 +0000 (20:34 +0000)]
Merge branch 'noworkarea'

12 years agoDon’t set the _NET_WM_WORKAREA hint at all (Thanks cg)
Michael Stapelberg [Wed, 30 Nov 2011 20:33:07 +0000 (20:33 +0000)]
Don’t set the _NET_WM_WORKAREA hint at all (Thanks cg)

Fixes: #539
12 years agoMerge branch 'displayversion'
Michael Stapelberg [Wed, 30 Nov 2011 20:10:42 +0000 (20:10 +0000)]
Merge branch 'displayversion'

12 years agodisplay i3 version in errors, make conversion message an error
Michael Stapelberg [Wed, 30 Nov 2011 20:09:32 +0000 (20:09 +0000)]
display i3 version in errors, make conversion message an error

12 years agoMerge branch 'fix-nested-resize'
Michael Stapelberg [Tue, 29 Nov 2011 22:37:08 +0000 (22:37 +0000)]
Merge branch 'fix-nested-resize'

12 years agoBugfix: Fix 'resize' command in nested containers (Thanks mseed)
Michael Stapelberg [Tue, 29 Nov 2011 22:36:40 +0000 (22:36 +0000)]
Bugfix: Fix 'resize' command in nested containers (Thanks mseed)

Fixes: #559
12 years agoMerge branch 'v4-keywords'
Michael Stapelberg [Tue, 29 Nov 2011 21:24:01 +0000 (21:24 +0000)]
Merge branch 'v4-keywords'

12 years agoadd a few more keywords to make i3 recognize configs as v4
Michael Stapelberg [Tue, 29 Nov 2011 21:20:42 +0000 (21:20 +0000)]
add a few more keywords to make i3 recognize configs as v4

12 years agoMerge branch 'fix-resize'
Michael Stapelberg [Tue, 29 Nov 2011 20:50:09 +0000 (20:50 +0000)]
Merge branch 'fix-resize'

12 years agoBugfix: Fix resizing for (e.g.) v-split containers in h-split containers
Michael Stapelberg [Tue, 29 Nov 2011 20:48:59 +0000 (20:48 +0000)]
Bugfix: Fix resizing for (e.g.) v-split containers in h-split containers

Fixes: #562
12 years agoMerge branch 'fix-tab-focus'
Michael Stapelberg [Mon, 28 Nov 2011 23:27:46 +0000 (23:27 +0000)]
Merge branch 'fix-tab-focus'

12 years agoBugfix: Ignore EnterNotify events to prevent wrong focus in complex tabbed/stacked...
Michael Stapelberg [Mon, 28 Nov 2011 23:26:45 +0000 (23:26 +0000)]
Bugfix: Ignore EnterNotify events to prevent wrong focus in complex tabbed/stacked layouts (Thanks Phlogistique)

Fixes #560

Finally we have a good explanation and example for why we need to ignore
EnterNotify events which were caused by an Unmap :).

12 years agoMerge branch 'fix-whitespace'
Michael Stapelberg [Sun, 27 Nov 2011 21:44:25 +0000 (21:44 +0000)]
Merge branch 'fix-whitespace'

12 years agoconvert tabs into whitespaces in config files
mgsnova [Sun, 27 Nov 2011 13:18:50 +0000 (14:18 +0100)]
convert tabs into whitespaces in config files

12 years agoMerge branch 'fix-baf'
Michael Stapelberg [Sat, 26 Nov 2011 22:24:53 +0000 (22:24 +0000)]
Merge branch 'fix-baf'

12 years agoBugfix: Don’t create a workspace named "back_and_forth" on startup
Michael Stapelberg [Sat, 26 Nov 2011 22:24:30 +0000 (22:24 +0000)]
Bugfix: Don’t create a workspace named "back_and_forth" on startup

Fixes #565

12 years agoMerge branch 'fix-dock-focus'
Michael Stapelberg [Sat, 26 Nov 2011 22:17:58 +0000 (22:17 +0000)]
Merge branch 'fix-dock-focus'

12 years agoBugfix: Fix crash on '[class="i3bar"] focus' (+test) (Thanks f8l)
Michael Stapelberg [Sat, 26 Nov 2011 22:17:34 +0000 (22:17 +0000)]
Bugfix: Fix crash on '[class="i3bar"] focus' (+test) (Thanks f8l)

Fixes #575

12 years agoMerge branch 'fix-comment'
Michael Stapelberg [Sat, 26 Nov 2011 21:30:40 +0000 (21:30 +0000)]
Merge branch 'fix-comment'

12 years agoFix comment for the previous commit
Michael Stapelberg [Sat, 26 Nov 2011 21:30:26 +0000 (21:30 +0000)]
Fix comment for the previous commit

12 years agoMerge branch 'fix-float-border'
Michael Stapelberg [Sat, 26 Nov 2011 21:19:26 +0000 (21:19 +0000)]
Merge branch 'fix-float-border'

12 years agoBugfix: Retain absolute window position and size when changing floating borders ...
Michael Stapelberg [Sat, 26 Nov 2011 21:18:23 +0000 (21:18 +0000)]
Bugfix: Retain absolute window position and size when changing floating borders (Thanks binzter)

Fixes: #561
12 years agoMerge branch 'fix-norandr'
Michael Stapelberg [Thu, 24 Nov 2011 23:50:08 +0000 (23:50 +0000)]
Merge branch 'fix-norandr'

12 years agoBugfix: Fix startup when RandR is not present
Michael Stapelberg [Thu, 24 Nov 2011 23:49:35 +0000 (23:49 +0000)]
Bugfix: Fix startup when RandR is not present

12 years agoMerge branch 'fix-warning'
Michael Stapelberg [Tue, 22 Nov 2011 22:08:40 +0000 (22:08 +0000)]
Merge branch 'fix-warning'

12 years agoFix prototype in include/xcursor.h (Thanks Greg Kroah-Hartman)
Michael Stapelberg [Tue, 22 Nov 2011 22:08:22 +0000 (22:08 +0000)]
Fix prototype in include/xcursor.h (Thanks Greg Kroah-Hartman)

12 years agoMerge branch 'fix-float-fs'
Michael Stapelberg [Mon, 21 Nov 2011 23:10:06 +0000 (23:10 +0000)]
Merge branch 'fix-float-fs'

12 years agoBugfix: fix fullscreen with floating windows
Michael Stapelberg [Mon, 21 Nov 2011 23:04:49 +0000 (23:04 +0000)]
Bugfix: fix fullscreen with floating windows

Fixes: #564
12 years agoMerge branch 'fix-focusin-dock'
Michael Stapelberg [Mon, 21 Nov 2011 19:56:00 +0000 (19:56 +0000)]
Merge branch 'fix-focusin-dock'

12 years agoBugfix: Skip dock clients when handling FocusIn events (Thanks cradle)
Michael Stapelberg [Mon, 21 Nov 2011 19:55:41 +0000 (19:55 +0000)]
Bugfix: Skip dock clients when handling FocusIn events (Thanks cradle)

12 years agoipc: set CLOEXEC on client file descriptors (Thanks biiter)
Michael Stapelberg [Tue, 15 Nov 2011 23:39:43 +0000 (23:39 +0000)]
ipc: set CLOEXEC on client file descriptors (Thanks biiter)

13 years agoMerge branch 'next'
Michael Stapelberg [Fri, 11 Nov 2011 22:49:20 +0000 (22:49 +0000)]
Merge branch 'next'

13 years agoMerge branch 'release-4.1' into next
Michael Stapelberg [Fri, 11 Nov 2011 22:49:15 +0000 (22:49 +0000)]
Merge branch 'release-4.1' into next

13 years agoupdate debian/patches 4.1
Michael Stapelberg [Fri, 11 Nov 2011 22:40:38 +0000 (22:40 +0000)]
update debian/patches

13 years agodebian: add new manpages to i3-wm.manpages
Michael Stapelberg [Fri, 11 Nov 2011 22:37:01 +0000 (22:37 +0000)]
debian: add new manpages to i3-wm.manpages

13 years agobump manpage version to 4.1
Michael Stapelberg [Fri, 11 Nov 2011 22:33:45 +0000 (22:33 +0000)]
bump manpage version to 4.1

13 years agoAdd manpages for i3-sensible-{pager,editor,terminal}
Michael Stapelberg [Fri, 11 Nov 2011 22:29:10 +0000 (22:29 +0000)]
Add manpages for i3-sensible-{pager,editor,terminal}

13 years agoupdate debian packaging
Michael Stapelberg [Fri, 11 Nov 2011 22:17:49 +0000 (22:17 +0000)]
update debian packaging

13 years agoAdd release notes for v4.1
Michael Stapelberg [Fri, 11 Nov 2011 21:47:43 +0000 (21:47 +0000)]
Add release notes for v4.1

13 years agodebian: update changelog
Michael Stapelberg [Fri, 11 Nov 2011 21:28:32 +0000 (21:28 +0000)]
debian: update changelog

13 years agoBugfix: Only go to the parent container in resizing if that is actually a split container
Michael Stapelberg [Fri, 11 Nov 2011 19:19:14 +0000 (19:19 +0000)]
Bugfix: Only go to the parent container in resizing if that is actually a split container

(as opposed to a workspace)

This fixes a regression in resizing. We do need testcases for these things.

13 years agoBugfix: Correctly handle --no-startup-id with quoted exec commands (Thanks aksr)
Michael Stapelberg [Fri, 11 Nov 2011 00:28:04 +0000 (00:28 +0000)]
Bugfix: Correctly handle --no-startup-id with quoted exec commands (Thanks aksr)

Parser changes shortly before a release. What could possibly go wrong.

13 years agodocs/userguide: make the bar config reflect reality
Michael Stapelberg [Thu, 10 Nov 2011 23:37:53 +0000 (23:37 +0000)]
docs/userguide: make the bar config reflect reality

Forgot to update this when changing the color.

13 years agoBugfix: Render floating windows after rendering all outputs (Thanks mw)
Michael Stapelberg [Thu, 10 Nov 2011 20:30:51 +0000 (20:30 +0000)]
Bugfix: Render floating windows after rendering all outputs (Thanks mw)

Fixes #548

See the comment on why this is necessary.

13 years agoBugfix: Fix tabbed container resizing check (Thanks julien)
Michael Stapelberg [Thu, 10 Nov 2011 19:35:36 +0000 (19:35 +0000)]
Bugfix: Fix tabbed container resizing check (Thanks julien)

Fixes: #534
Turns out that my check was wrong. We actually just need to make sure we are
dealing with the split container.

13 years agomark parameters const
Michael Stapelberg [Thu, 10 Nov 2011 19:17:36 +0000 (19:17 +0000)]
mark parameters const

13 years agot/154-regress-multiple-dock: s/next v/focus right
Michael Stapelberg [Thu, 10 Nov 2011 18:43:03 +0000 (18:43 +0000)]
t/154-regress-multiple-dock: s/next v/focus right

13 years agoBugfix: Correctly return to initial state after prev/next/back_and_forth (Thanks...
Michael Stapelberg [Thu, 10 Nov 2011 18:42:24 +0000 (18:42 +0000)]
Bugfix: Correctly return to initial state after prev/next/back_and_forth (Thanks Brian)

Fixes: #552
13 years agos/1/true
Michael Stapelberg [Thu, 10 Nov 2011 18:38:29 +0000 (18:38 +0000)]
s/1/true

13 years agoi3bar: fix event handling
Michael Stapelberg [Wed, 9 Nov 2011 23:23:21 +0000 (23:23 +0000)]
i3bar: fix event handling

i3bar would only handle one event at a time instead of all pending events.

13 years agoi3bar: correctly handle unmapped tray clients, reconfigure tray icons after mapping...
Michael Stapelberg [Wed, 9 Nov 2011 23:22:44 +0000 (23:22 +0000)]
i3bar: correctly handle unmapped tray clients, reconfigure tray icons after mapping/unmapping (Thanks IsoLnCHiP)

Fixes #550

13 years agocomplete-run: remove Carp::Always, slipped in when debugging
Michael Stapelberg [Wed, 9 Nov 2011 22:41:56 +0000 (22:41 +0000)]
complete-run: remove Carp::Always, slipped in when debugging

13 years agocomplete-run: don’t print long logfile paths, they are useless by now anyway
Michael Stapelberg [Wed, 9 Nov 2011 22:38:29 +0000 (22:38 +0000)]
complete-run: don’t print long logfile paths, they are useless by now anyway

13 years agoMerge remote-tracking branch 'mxf/complete-run-statusline' into next
Michael Stapelberg [Wed, 9 Nov 2011 22:36:32 +0000 (22:36 +0000)]
Merge remote-tracking branch 'mxf/complete-run-statusline' into next

13 years agoBugfix: Correctly fill the buffer with zeros
Michael Stapelberg [Wed, 9 Nov 2011 22:23:33 +0000 (22:23 +0000)]
Bugfix: Correctly fill the buffer with zeros