commit dd363e6519647cb4f88d1cb289647a0d7f5f80c3
parent 4fef329f121b6b6b9d40e6abb75825f6117fa8be
Author: lumidify <nobody@lumidify.org>
Date: Sun, 26 Dec 2021 11:06:40 +0100
Improve documentation very slightly
Diffstat:
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/ledit.1 b/ledit.1
@@ -1,6 +1,6 @@
.\" WARNING: Some parts of this are stolen shamelessly from OpenBSD's
.\" vi(1) manpage!
-.Dd December 18, 2021
+.Dd December 26, 2021
.Dt LEDIT 1
.Os
.Sh NAME
@@ -922,4 +922,8 @@ Too many to count.
See
.Sx TINY SUBSET OF BUGS .
.Sh TINY SUBSET OF BUGS
-(Todo)
+The keyboard mapping is currently only changed when a keyboard change event
+occurs.
+This means that it always is the default mapping when
+.Nm
+starts, regardless of the current keyboard layout.
diff --git a/window.c b/window.c
@@ -510,7 +510,6 @@ xximspot(ledit_window *window, int x, int y) {
ledit_window *
window_create(ledit_common *common, ledit_theme *theme, ledit_mode mode) {
- XSetWindowAttributes attrs;
XGCValues gcv;
ledit_window *window = ledit_malloc(sizeof(ledit_window));
@@ -530,7 +529,8 @@ window_create(ledit_common *common, ledit_theme *theme, ledit_mode mode) {
window->button_cb_data = NULL;
window->resize_cb_data = NULL;
- memset(&window->wattrs, 0, sizeof(attrs));
+ memset(&window->wattrs, 0, sizeof(window->wattrs));
+ /* FIXME: use theme color? */
window->wattrs.background_pixel = BlackPixel(common->dpy, common->screen);
window->wattrs.colormap = common->cm;
/* this causes the window contents to be kept
@@ -672,7 +672,7 @@ void
window_clear(ledit_window *window) {
XSetForeground(window->common->dpy, window->gc, window->theme->text_bg.pixel);
XFillRectangle(
- window->common->dpy, window->back_buf, window->gc, 0, 0, window->w, window->h
+ window->common->dpy, window->drawable, window->gc, 0, 0, window->w, window->h
);
}