Skip to content

Commit bfefa23

Browse files
authored
released at 0.1.7
1 parent 1c3a5be commit bfefa23

File tree

5 files changed

+88
-85
lines changed

5 files changed

+88
-85
lines changed

CHANGELOG

+65-58
Original file line numberDiff line numberDiff line change
@@ -4,102 +4,109 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [0.0.1] - 2020-11-06
8-
### Added
9-
- Initial release.
10-
11-
## [0.0.2] - 2020-11-07
12-
### Added
13-
- Close window command (default: Win+q).
7+
## [0.1.7] - 2021-03-03
8+
### Fixed
9+
- Memory leak due to xcb_wait_for_event() not being freed.
10+
- Order of the CHANGELOG (i.e. latest on top).
1411

15-
### Fixed
16-
- Resize crash in root window.
17-
18-
## [0.0.3] - 2020-11-08
12+
## [0.1.6] - 2020-12-28
1913
### Added
20-
- Examples in the config.h file.
21-
- Window height and width parameters.
14+
- Window fullscreen command alias (default: Win+f).
2215

16+
## [0.1.5] - 2020-12-23
2317
### Removed
24-
- string.h library dependency.
18+
- Unused root padding definitions.
19+
- xcb_wait_for_event() not being freed.
2520

26-
## [0.0.4] - 2020-11-10
21+
## [0.1.4] - 2020-12-22
2722
### Added
28-
- Instructions for patches and the patching process.
29-
- Minimum window height and width parameters.
23+
- Raise focus command keys to xwm.1 and README.
24+
25+
### Changed
26+
- The "Features" section of the README to indicate audience.
3027

3128
### Removed
32-
- Unused stdarg.h library dependency.
29+
- Pointer warp on window resize/move as this appears to be default.
3330

3431
### Fixed
35-
- Crash when pointer x/y cords less than window origin.
36-
37-
## [0.0.5] - 2020-11-11
38-
### Added
39-
- Default key bindings in man page.
40-
- Disclaimer section in README.
32+
- Spelling and grammar in man page.
4133

42-
## [0.0.6] - 2020-11-12
34+
## [0.1.3] - 2020-11-30
4335
### Added
44-
- Window borders and color definitions.
45-
46-
## [0.0.7] - 2020-11-13
47-
### Fixed
48-
- Border focus/unfocus when leaving a window.
36+
- Instructions in README for Arch Linux AUR installation.
4937

50-
## [0.0.8] - 2020-11-16
51-
### Fixed
52-
- Window focus/unfocus on new window creation.
38+
### Changed
39+
- Default new window location from top-left to center.
5340

5441
### Removed
5542
- Global root variable.
5643
- Removed leave notify event.
5744

58-
## [0.0.9] - 2020-11-17
45+
## [0.1.2] - 2020-11-23
46+
### Changed
47+
- Default surf start page to startpage.com.
48+
5949
### Fixed
60-
- Window resize lag.
61-
- Bug where window border moves outside of root window.
50+
- Zombie reaping.
51+
52+
## [0.1.1] - 2020-11-21
53+
### Added
54+
- Makefile warnings (e.g. -Wall, Wextra, etc.).
6255

6356
## [0.1.0] - 2020-11-20
6457
### Fixed
6558
- MISRA 10.4 non-compliance.
6659
- Fix operator dependence.
6760

68-
## [0.1.1] - 2020-11-21
69-
### Added
70-
- Makefile warnings (e.g. -Wall, Wextra, etc.).
61+
## [0.0.9] - 2020-11-17
62+
### Fixed
63+
- Window resize lag.
64+
- Bug where window border moves outside of root window.
7165

72-
## [0.1.2] - 2020-11-23
73-
### Changed
74-
- Default surf start page to startpage.com.
66+
## [0.0.8] - 2020-11-16
67+
### Fixed
68+
- Window focus/unfocus on new window creation.
7569

70+
## [0.0.7] - 2020-11-13
7671
### Fixed
77-
- Zombie reaping.
72+
- Border focus/unfocus when leaving a window.
7873

79-
## [0.1.3] - 2020-11-30
74+
## [0.0.6] - 2020-11-12
8075
### Added
81-
- Instructions in README for Arch Linux AUR installation.
82-
83-
### Changed
84-
- Default new window location from top-left to center.
76+
- Window borders and color definitions.
8577

86-
## [0.1.4] - 2020-12-22
78+
## [0.0.5] - 2020-11-11
8779
### Added
88-
- Raise focus command keys to xwm.1 and README.
80+
- Default key bindings in man page.
81+
- Disclaimer section in README.
8982

90-
### Changed
91-
- The "Features" section of the README to indicate audience.
83+
## [0.0.4] - 2020-11-10
84+
### Added
85+
- Instructions for patches and the patching process.
86+
- Minimum window height and width parameters.
9287

9388
### Removed
94-
- Pointer warp on window resize/move as this appears to be default.
89+
- Unused stdarg.h library dependency.
9590

9691
### Fixed
97-
- Spelling and grammar in man page.
92+
- Crash when pointer x/y cords less than window origin.
93+
94+
## [0.0.3] - 2020-11-08
95+
### Added
96+
- Examples in the config.h file.
97+
- Window height and width parameters.
9898

99-
## [0.1.5] - 2020-12-23
10099
### Removed
101-
- Unused root padding definitions.
100+
- string.h library dependency.
102101

103-
## [0.1.6] - 2020-12-28
102+
## [0.0.2] - 2020-11-07
104103
### Added
105-
- Window fullscreen command alias (default: Win+f).
104+
- Close window command (default: Win+q).
105+
106+
### Fixed
107+
- Resize crash in root window.
108+
109+
## [0.0.1] - 2020-11-06
110+
### Added
111+
- Initial release.
112+

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Michael Czigler
3+
Copyright (c) 2021 Michael Czigler
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README

+11-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
xwm - a tiny XCB floating window manager
2+
========================================
23

34
A minimal viable solution that was developed with single-monitor
45
workflows in mind. Despite the small footprint, xwm maintains
56
extensibility and can be customized to enhance the user experience.
67

78
REQUIREMENTS
8-
============
9+
------------
910

1011
xcb-util-keysyms, along with any default or user defined utilities:
1112
application launcher https://git.suckless.org/dmenu
1213
terminal emulator https://git.suckless.org/st
1314
internet browser https://git.suckless.org/surf
1415

1516
COMMANDS
16-
========
17+
--------
1718

1819
Default keys and behavior can be customized via the config.h file:
1920
Win+Button1 raise focused window to top of stack
@@ -28,37 +29,28 @@ Default keys and behavior can be customized via the config.h file:
2829
Win+Shift+q quit window manager
2930

3031
INSTALL
31-
=======
32+
-------
3233

3334
Building and installing from source:
3435
git clone https://github.com/mcpcpc/xwm
3536
cd xwm
3637
make
3738
sudo make install
3839

39-
Building and installing on KISS Linux:
40-
kiss b xwm
41-
kiss i xwm
42-
43-
Build and install from Arch Linux AUR:
44-
git clone https://aur.archlinux.org/xwm.git
45-
cd kirc
46-
makepkg -si
47-
4840
PATCHES
49-
=======
41+
-------
5042

5143
For additional features, I have provided a respository for sharing
5244
and hosting user created patches:
5345
https://github.com/mcpcpc/xwm-community
5446

5547
EXAMPLES
56-
========
48+
--------
5749

58-
Check your xwm installed version:
50+
Checking the installed version of xwm:
5951
xwm -v
6052

61-
Usimg startx to run xwm:
53+
Using startx to run xwm:
6254
echo "exec xwm" > ~/.xinitrc
6355
startx
6456

@@ -69,13 +61,13 @@ Patching xwm:
6961
patch -p0 < mypatch.patch
7062

7163
DISCLAIMER
72-
==========
64+
----------
7365

7466
xwm ("XCB Window Manager") is an homage to the original and
7567
now-defunct "X Window Manager". Both projects are unaffiliated
7668
and do not share any common source code.
7769

7870
CONTACT
79-
=======
71+
-------
8072

81-
For questions or issues, please contact info[at]mcpcpc[dot]com.
73+
For questions or issues, please contact michaelczigler[at]mcpcpc[dot]com.

xwm.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ _
7777
.SH BUGS
7878
No known bugs.
7979
.SH AUTHOR
80-
Michael Czigler <info[at]mcpcpc[dot]com>
80+
Michael Czigler <michaelczigler[at]mcpcpc[dot]com>
8181
.SH "SEE ALSO"
8282
.BR livxcb (1),
8383
.BR st (1),

xwm.c

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* See LICENSE file for license details. */
2+
#include <stdlib.h>
23
#include <sys/wait.h>
34
#include <unistd.h>
45
#include <xcb/xcb.h>
@@ -28,7 +29,7 @@ static void closewm(char **com) {
2829
static void spawn(char **com) {
2930
if (fork() == 0) {
3031
if (dpy != NULL) {
31-
close(scre->root);
32+
xcb_destroy_window(dpy, scre->root);
3233
}
3334
setsid();
3435
if (fork() != 0) {
@@ -187,12 +188,15 @@ static int eventHandler(void) {
187188
int ret = xcb_connection_has_error(dpy);
188189
if (ret == 0) {
189190
xcb_generic_event_t * ev = xcb_wait_for_event(dpy);
190-
handler_func_t * handler;
191-
for (handler = handler_funs; handler->func != NULL; handler++) {
192-
if ((ev->response_type & ~0x80) == handler->request) {
193-
handler->func(ev);
191+
if (ev != NULL) {
192+
handler_func_t * handler;
193+
for (handler = handler_funs; handler->func != NULL; handler++) {
194+
if ((ev->response_type & ~0x80) == handler->request) {
195+
handler->func(ev);
196+
}
194197
}
195198
}
199+
free(ev);
196200
}
197201
xcb_flush(dpy);
198202
return ret;
@@ -252,7 +256,7 @@ static int strcmp_c(char * str1, char * str2) {
252256
int main(int argc, char * argv[]) {
253257
int ret = 0;
254258
if ((argc == 2) && (strcmp_c("-v", argv[1]) == 0)) {
255-
ret = die("xwm-0.1.6, © 2020 Michael Czigler, see LICENSE for details\n");
259+
ret = die("xwm-0.1.7, Copyright © 2021 Michael Czigler, MIT License\n");
256260
}
257261
if ((ret == 0) && (argc != 1)) {
258262
ret = die("usage: xwm [-v]\n");

0 commit comments

Comments
 (0)