Codebase list i3-gaps / 22059fc
Merge remote-tracking branch 'vanilla/next' into gaps-next Ingo Bürk 4 years ago
73 changed file(s) with 317 addition(s) and 398 deletion(s). Raw diff Collapse all Expand all
378378
379379 i3_nagbar_i3_nagbar_SOURCES = \
380380 i3-nagbar/atoms.xmacro \
381 i3-nagbar/i3-nagbar.h \
382381 i3-nagbar/main.c
383382
384383 i3bar_i3bar_CPPFLAGS = \
116116 open(my $enumfh, '>', "GENERATED_${prefix}_enums.h");
117117
118118 my %statenum;
119 say $enumfh '#pragma once';
119120 say $enumfh 'typedef enum {';
120121 my $cnt = 0;
121122 for my $state (@keys, '__CALL') {
130131 # Third step: Generate the call function.
131132 open(my $callfh, '>', "GENERATED_${prefix}_call.h");
132133 my $resultname = uc(substr($prefix, 0, 1)) . substr($prefix, 1) . 'ResultIR';
134 say $callfh '#pragma once';
133135 say $callfh "static void GENERATED_call(const int call_identifier, struct $resultname *result) {";
134136 say $callfh ' switch (call_identifier) {';
135137 my $call_id = 0;
205207 # Fourth step: Generate the token datastructures.
206208
207209 open(my $tokfh, '>', "GENERATED_${prefix}_tokens.h");
210 say $tokfh '#pragma once';
208211
209212 for my $state (@keys) {
210213 my $tokens = $states{$state};
99 */
1010 #include <config.h>
1111
12 #include "libi3.h"
13
1214 #if defined(__FreeBSD__)
1315 #include <sys/param.h>
1416 #endif
2224 #define _WITH_GETLINE
2325 #endif
2426
25 #include <stdio.h>
26 #include <sys/types.h>
27 #include <stdlib.h>
28 #include <stdbool.h>
29 #include <unistd.h>
30 #include <string.h>
3127 #include <ctype.h>
28 #include <err.h>
3229 #include <errno.h>
33 #include <err.h>
34 #include <stdint.h>
30 #include <fcntl.h>
3531 #include <getopt.h>
3632 #include <limits.h>
33 #include <stdlib.h>
34 #include <string.h>
3735 #include <sys/stat.h>
38 #include <fcntl.h>
39 #include <glob.h>
40 #include <assert.h>
36 #include <sys/types.h>
37 #include <unistd.h>
4138
4239 #include <xcb/xcb.h>
4340 #include <xcb/xcb_aux.h>
4441 #include <xcb/xcb_event.h>
4542 #include <xcb/xcb_keysyms.h>
46
43 #include <xkbcommon/xkbcommon-x11.h>
4744 #include <xkbcommon/xkbcommon.h>
48 #include <xkbcommon/xkbcommon-x11.h>
4945
5046 #define SN_API_NOT_YET_FROZEN 1
5147 #include <libsn/sn-launchee.h>
5248
49 #include <X11/XKBlib.h>
5350 #include <X11/Xlib.h>
5451 #include <X11/keysym.h>
55 #include <X11/XKBlib.h>
5652
5753 /* We need SYSCONFDIR for the path to the keycode config template, so raise an
5854 * error if it’s not defined for whatever reason */
6864
6965 #include "xcb.h"
7066 xcb_visualtype_t *visual_type = NULL;
71 #include "libi3.h"
7267
7368 #define TEXT_PADDING logical_px(4)
7469 #define WIN_POS_X logical_px(490)
88 */
99 #include <config.h>
1010
11 #include "libi3.h"
12 #include "shmlog.h"
13
14 #include <err.h>
15 #include <fcntl.h>
16 #include <getopt.h>
17 #include <i3/ipc.h>
18 #include <signal.h>
19 #include <stdbool.h>
20 #include <stdint.h>
1121 #include <stdio.h>
12 #include <stdbool.h>
13 #include <sys/types.h>
14 #include <sys/socket.h>
15 #include <sys/un.h>
1622 #include <stdlib.h>
17 #include <unistd.h>
1823 #include <string.h>
19 #include <errno.h>
20 #include <err.h>
21 #include <stdint.h>
22 #include <getopt.h>
23 #include <limits.h>
24 #include <fcntl.h>
2524 #include <sys/mman.h>
2625 #include <sys/stat.h>
27 #include <signal.h>
28
29 #include "libi3.h"
30 #include "shmlog.h"
31 #include <i3/ipc.h>
26 #include <unistd.h>
3227
3328 #if !defined(__OpenBSD__)
3429 static uint32_t offset_next_write;
3030 * This software is in the public domain. Share and enjoy!
3131 */
3232
33 #include "keysym2ucs.h"
34
3335 #include <xcb/xcb.h>
34 #include "keysym2ucs.h"
3536
3637 struct codepair {
3738 unsigned short keysym;
77 * to i3.
88 *
99 */
10 #include <getopt.h>
11 #include <stdbool.h>
12 #include <stdint.h>
1013 #include <stdio.h>
14 #include <stdlib.h>
15 #include <string.h>
1116 #include <sys/types.h>
12 #include <stdlib.h>
13 #include <stdbool.h>
1417 #include <unistd.h>
15 #include <string.h>
16 #include <errno.h>
17 #include <err.h>
18 #include <stdint.h>
19 #include <getopt.h>
20 #include <limits.h>
2118
2219 #include <xcb/xcb.h>
2320 #include <xcb/xcb_aux.h>
24 #include <xcb/xcb_event.h>
2521 #include <xcb/xcb_keysyms.h>
2622
2723 xcb_visualtype_t *visual_type = NULL;
24 #include "i3-input.h"
25 #include "keysym2ucs.h"
2826 #include "libi3.h"
2927
3028 #include <X11/keysym.h>
31
32 #include "keysym2ucs.h"
33
34 #include "i3-input.h"
3529
3630 #define MAX_WIDTH logical_px(500)
3731 #define BORDER logical_px(2)
1515 */
1616 #include "libi3.h"
1717
18 #include <err.h>
19 #include <getopt.h>
20 #include <i3/ipc.h>
21 #include <stdbool.h>
22 #include <stdint.h>
1823 #include <stdio.h>
19 #include <stdbool.h>
20 #include <sys/types.h>
21 #include <sys/socket.h>
22 #include <sys/un.h>
2324 #include <stdlib.h>
25 #include <string.h>
2426 #include <unistd.h>
25 #include <string.h>
26 #include <errno.h>
27 #include <err.h>
28 #include <stdint.h>
29 #include <getopt.h>
30 #include <limits.h>
3127
3228 #include <yajl/yajl_parse.h>
33 #include <yajl/yajl_version.h>
34
35 #include <xcb/xcb.h>
36 #include <xcb/xcb_aux.h>
37
38 #include <i3/ipc.h>
3929
4030 /*
4131 * Having verboselog() and errorlog() is necessary when using libi3.
+0
-18
i3-nagbar/i3-nagbar.h less more
0 #pragma once
1
2 #include <config.h>
3
4 #include <err.h>
5
6 #define die(...) errx(EXIT_FAILURE, __VA_ARGS__);
7 #define FREE(pointer) \
8 do { \
9 free(pointer); \
10 pointer = NULL; \
11 } while (0)
12
13 #define xmacro(atom) xcb_atom_t A_##atom;
14 #include "atoms.xmacro"
15 #undef xmacro
16
17 extern xcb_window_t root;
77 * when the user has an error in their configuration file.
88 *
99 */
10 #include <stdio.h>
11 #include <sys/types.h>
12 #include <sys/stat.h>
13 #include <sys/wait.h>
14 #include <stdlib.h>
15 #include <stdbool.h>
16 #include <unistd.h>
17 #include <string.h>
18 #include <errno.h>
10 #include <config.h>
11
12 #include "libi3.h"
13
1914 #include <err.h>
20 #include <stdint.h>
15 #include <fcntl.h>
2116 #include <getopt.h>
2217 #include <limits.h>
23 #include <fcntl.h>
2418 #include <paths.h>
25
19 #include <stdint.h>
20 #include <stdlib.h>
21 #include <string.h>
22 #include <sys/stat.h>
23 #include <sys/types.h>
24 #include <sys/wait.h>
25 #include <unistd.h>
26
27 #include <xcb/randr.h>
2628 #include <xcb/xcb.h>
2729 #include <xcb/xcb_aux.h>
28 #include <xcb/xcb_event.h>
29 #include <xcb/randr.h>
3030 #include <xcb/xcb_cursor.h>
3131
3232 xcb_visualtype_t *visual_type = NULL;
33 #include "libi3.h"
3433
3534 #define SN_API_NOT_YET_FROZEN 1
3635 #include <libsn/sn-launchee.h>
37
38 #include "i3-nagbar.h"
3936
4037 #define MSG_PADDING logical_px(8)
4138 #define BTN_PADDING logical_px(3)
4340 #define BTN_GAP logical_px(20)
4441 #define CLOSE_BTN_GAP logical_px(15)
4542 #define BAR_BORDER logical_px(2)
43
44 #define xmacro(atom) xcb_atom_t A_##atom;
45 #include "atoms.xmacro"
46 #undef xmacro
47
48 #define die(...) errx(EXIT_FAILURE, __VA_ARGS__);
4649
4750 static char *argv0 = NULL;
4851
313316 goto free_resources;
314317
315318 free_resources:
316 FREE(res);
317 FREE(primary);
319 free(res);
320 free(primary);
318321 return result;
319322 }
320323
597600 free(event);
598601 }
599602
600 FREE(pattern);
603 free(pattern);
601604 draw_util_surface_free(conn, &bar);
602605
603606 return 0;
88
99 #include <config.h>
1010
11 #include <stdbool.h>
1211 #include <xcb/xcb.h>
1312 #include <xcb/xproto.h>
1413 #include "libi3.h"
9392 #include "trayclients.h"
9493 #include "xcb.h"
9594 #include "configuration.h"
96 #include "libi3.h"
9795 #include "parse_json_header.h"
99 #include "common.h"
1010 #include "yajl_utils.h"
1111
12 #include <err.h>
13 #include <errno.h>
14 #include <ev.h>
15 #include <fcntl.h>
16 #include <paths.h>
17 #include <signal.h>
18 #include <stdarg.h>
19 #include <stdio.h>
1220 #include <stdlib.h>
21 #include <string.h>
22 #include <sys/wait.h>
1323 #include <unistd.h>
14 #include <sys/types.h>
15 #include <sys/wait.h>
16 #include <signal.h>
17 #include <stdio.h>
18 #include <stdarg.h>
19 #include <fcntl.h>
20 #include <string.h>
21 #include <errno.h>
22 #include <err.h>
23 #include <ev.h>
24 #include <yajl/yajl_common.h>
24
25 #include <yajl/yajl_gen.h>
2526 #include <yajl/yajl_parse.h>
26 #include <yajl/yajl_version.h>
27 #include <yajl/yajl_gen.h>
28 #include <paths.h>
29
30 #include <xcb/xcb_keysyms.h>
3127
3228 /* Global variables for child_*() */
3329 i3bar_child child;
88 */
99 #include "common.h"
1010
11 #include <stdio.h>
12 #include <stdlib.h>
1113 #include <string.h>
12 #include <stdlib.h>
13 #include <stdio.h>
14 #include <errno.h>
15 #include <i3/ipc.h>
14
15 #include <X11/Xlib.h>
1616 #include <yajl/yajl_parse.h>
17 #include <yajl/yajl_version.h>
18
19 #include <X11/Xlib.h>
2017
2118 config_t config;
2219 static char *cur_key;
88 */
99 #include "common.h"
1010
11 #include <errno.h>
12 #include <ev.h>
13 #include <i3/ipc.h>
14 #include <stdint.h>
1115 #include <stdlib.h>
12 #include <stdio.h>
16 #include <string.h>
1317 #include <unistd.h>
14 #include <stdint.h>
15 #include <string.h>
16 #include <errno.h>
17 #include <sys/socket.h>
18 #include <sys/un.h>
19 #include <i3/ipc.h>
20 #include <ev.h>
2118 #ifdef I3_ASAN_ENABLED
2219 #include <sanitizer/lsan_interface.h>
2320 #endif
66 */
77 #include "common.h"
88
9 #include <stdio.h>
10 #include <i3/ipc.h>
11 #include <string.h>
12 #include <unistd.h>
13 #include <stdlib.h>
14 #include <errno.h>
159 #include <ev.h>
1610 #include <getopt.h>
1711 #include <glob.h>
12 #include <i3/ipc.h>
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <string.h>
1816
1917 struct ev_loop *main_loop;
2018
88 */
99 #include "common.h"
1010
11 #include <stdlib.h>
1112 #include <string.h>
12 #include <stdlib.h>
13 #include <stdio.h>
14 #include <errno.h>
13
1514 #include <yajl/yajl_parse.h>
16 #include <yajl/yajl_version.h>
1715
1816 /* A datatype to pass through the callbacks to save the state */
1917 struct mode_json_params {
88 */
99 #include "common.h"
1010
11 #include <errno.h>
12 #include <stdio.h>
13 #include <stdlib.h>
1114 #include <string.h>
12 #include <stdlib.h>
13 #include <stdio.h>
14 #include <errno.h>
15 #include <i3/ipc.h>
15
1616 #include <yajl/yajl_parse.h>
17 #include <yajl/yajl_version.h>
1817
1918 /* A datatype to pass through the callbacks to save the state */
2019 struct outputs_json_params {
99 */
1010 #include "common.h"
1111
12 #include <stdlib.h>
13 #include <unistd.h>
14 #include <sys/types.h>
15 #include <sys/wait.h>
1612 #include <signal.h>
17 #include <stdio.h>
18 #include <fcntl.h>
1913 #include <string.h>
20 #include <errno.h>
21 #include <err.h>
22 #include <ev.h>
23 #include <stdbool.h>
24 #include <stdint.h>
25 #include <yajl/yajl_common.h>
14
2615 #include <yajl/yajl_parse.h>
27 #include <yajl/yajl_version.h>
2816
2917 static enum {
3018 KEY_VERSION,
88 */
99 #include "common.h"
1010
11 #include <stdlib.h>
1112 #include <string.h>
12 #include <stdlib.h>
13 #include <stdio.h>
14 #include <errno.h>
13
1514 #include <yajl/yajl_parse.h>
16 #include <yajl/yajl_version.h>
1715
1816 /* A datatype to pass through the callbacks to save the state */
1917 struct workspaces_json_params {
88 */
99 #include "common.h"
1010
11 #include <xcb/xcb.h>
12 #include <xcb/xkb.h>
13 #include <xcb/xproto.h>
11 #include <err.h>
12 #include <ev.h>
13 #include <i3/ipc.h>
14 #include <stdlib.h>
15 #include <string.h>
16
1417 #include <xcb/xcb_aux.h>
1518 #include <xcb/xcb_cursor.h>
16
17 #include <stdio.h>
18 #include <stdlib.h>
19 #include <unistd.h>
20 #include <fcntl.h>
21 #include <string.h>
22 #include <i3/ipc.h>
23 #include <ev.h>
24 #include <errno.h>
25 #include <limits.h>
26 #include <err.h>
27
28 #include <X11/Xlib.h>
29 #include <X11/XKBlib.h>
30 #include <X11/extensions/XKB.h>
19 #include <xcb/xkb.h>
3120
3221 #ifdef I3_ASAN_ENABLED
3322 #include <sanitizer/lsan_interface.h>
1414 #include <config.h>
1515
1616 #include <assert.h>
17 #include <err.h>
18 #include <errno.h>
19 #include <limits.h>
20 #include <stdarg.h>
1721 #include <stdbool.h>
22 #include <stdint.h>
23 #include <stdio.h>
1824 #include <stdlib.h>
19 #include <stdio.h>
2025 #include <string.h>
21 #include <locale.h>
22 #include <getopt.h>
23 #include <unistd.h>
2426 #include <sys/stat.h>
2527 #include <sys/types.h>
26 #include <glob.h>
27 #include <errno.h>
28 #include <err.h>
29 #include <stdint.h>
30 #include <inttypes.h>
31 #include <math.h>
32 #include <limits.h>
3328
3429 #include <xcb/xcb.h>
3530 #include <xcb/xcb_aux.h>
31 #include <xcb/xcb_icccm.h>
3632 #include <xcb/xcb_keysyms.h>
37 #include <xcb/xcb_icccm.h>
3833
39 #include <yajl/yajl_gen.h>
40 #include <yajl/yajl_version.h>
41
34 #include "libi3.h"
4235 #include "data.h"
4336 #include "util.h"
4437 #include "ipc.h"
7164 #include "ewmh.h"
7265 #include "assignments.h"
7366 #include "regex.h"
74 #include "libi3.h"
7567 #include "startup.h"
7668 #include "scratchpad.h"
7769 #include "commands.h"
1111 */
1212 #pragma once
1313
14 #include "libi3.h"
15
16 #include <stdbool.h>
1714 #include "queue.h"
1815 #include "i3.h"
1916
88 */
99 #pragma once
1010
11 #include "libi3.h"
12
1311 #define SN_API_NOT_YET_FROZEN 1
1412 #include <libsn/sn-launcher.h>
1513
1614 #include <xcb/randr.h>
17 #include <stdbool.h>
1815 #include <pcre.h>
1916 #include <sys/time.h>
2017
2424 * floating_windows list of the workspace.
2525 *
2626 */
27 void floating_enable(Con *con, bool automatic);
27 bool floating_enable(Con *con, bool automatic);
2828
2929 /**
3030 * Disables floating mode for the given container by re-attaching the container
1111 #include <config.h>
1212
1313 #include <ev.h>
14 #include <stdbool.h>
1514 #include <yajl/yajl_gen.h>
1615 #include <yajl/yajl_parse.h>
1716
99 #pragma once
1010
1111 #include <config.h>
12
13 #include <stdarg.h>
14 #include <stdbool.h>
1512
1613 /* We will include libi3.h which define its own version of LOG, ELOG.
1714 * We want *our* version, so we undef the libi3 one. */
1111
1212 #include <config.h>
1313
14 #include <stdint.h>
1514 #if !defined(__OpenBSD__)
1615 #include <pthread.h>
1716 #endif
1212
1313 #include <config.h>
1414
15 #include "data.h"
16
1715 /**
1816 * We have just established a connection to the X server and need the initial
1917 * Xinerama information to setup workspaces for each screen.
88
99 #include <math.h>
1010 #include <stdlib.h>
11
1112 #include <xcb/xcb_xrm.h>
1213
1314 static long dpi;
88 #include "libi3.h"
99
1010 #include <stdlib.h>
11 #include <err.h>
1211 #include <string.h>
12
1313 #include <xcb/xcb.h>
1414 #include <xcb/xcb_aux.h>
15 #include <cairo/cairo-xcb.h>
1615
1716 /* The default visual_type to use if none is specified when creating the surface. Must be defined globally. */
1817 extern xcb_visualtype_t *visual_type;
77 #include "libi3.h"
88
99 #include <stdlib.h>
10 #include <stdbool.h>
1110
1211 #include <xcb/xcb.h>
1312 #include <xcb/xproto.h>
77 #include "libi3.h"
88
99 #include <assert.h>
10 #include <cairo/cairo-xcb.h>
11 #include <err.h>
12 #include <pango/pangocairo.h>
1013 #include <stdint.h>
1114 #include <stdlib.h>
1215 #include <string.h>
13 #include <stdbool.h>
14 #include <err.h>
15
16 #include <cairo/cairo-xcb.h>
17 #include <pango/pangocairo.h>
1816
1917 static const i3Font *savedFont = NULL;
2018
77 #include "libi3.h"
88
99 #include <stdlib.h>
10 #include <stdint.h>
1110 #include <string.h>
1211
1312 #ifndef CS_STARTS_WITH
1818
1919 #include "libi3.h"
2020
21 #include <glib.h>
2122 #include <string.h>
22 #include <glib.h>
2323
2424 /* Copied from:
2525 * https://gitlab.gnome.org/GNOME/glib/blob/f928dfdf57bf92c883b53b16d7a9d49add504f52/glib/gutf8.c#L1752-1815 */
55 *
66 */
77 #include "libi3.h"
8 #include "queue.h"
89
10 #include <stdint.h>
911 #include <stdlib.h>
10 #include <stdint.h>
1112 #include <string.h>
12
13 #include "queue.h"
1413 struct Colorpixel {
1514 char hex[8];
1615 uint32_t pixel;
66 */
77 #include "libi3.h"
88
9 #include <errno.h>
10 #include <stdlib.h>
11 #include <string.h>
912 #include <unistd.h>
10 #include <string.h>
11 #include <stdio.h>
12 #include <limits.h>
13 #include <stdlib.h>
14 #include <errno.h>
1513
1614 /*
1715 * This function returns the absolute path to the executable it is running in.
88
99 #include <stdint.h>
1010 #include <stdlib.h>
11
1112 #include <xcb/xcb.h>
1213 #include <xcb/xcb_keysyms.h>
1314
66 */
77 #include "libi3.h"
88
9 #include <assert.h>
10 #include <stdint.h>
9 #include <err.h>
10 #include <pwd.h>
1111 #include <stdlib.h>
12 #include <string.h>
13 #include <stdbool.h>
14 #include <err.h>
1512 #include <sys/stat.h>
16 #include <sys/types.h>
17 #include <pwd.h>
1813 #include <unistd.h>
19 #include <err.h>
2014
2115 /*
2216 * Returns the name of a temporary file with the specified prefix.
66 */
77 #include "libi3.h"
88
9 #include <sys/types.h>
9 #include <err.h>
10 #include <fcntl.h>
11 #include <stdlib.h>
12 #include <string.h>
1013 #include <sys/socket.h>
1114 #include <sys/un.h>
12 #include <string.h>
13 #include <err.h>
14 #include <stdlib.h>
15 #include <unistd.h>
16 #include <fcntl.h>
1715
1816 /*
1917 * Connects to the i3 IPC socket and returns the file descriptor for the
66 */
77 #include "libi3.h"
88
9 #include <errno.h>
10 #include <i3/ipc.h>
11 #include <inttypes.h>
12 #include <stdint.h>
913 #include <string.h>
10 #include <stdlib.h>
11 #include <stdio.h>
12 #include <stdint.h>
1314 #include <unistd.h>
14 #include <errno.h>
15 #include <inttypes.h>
16
17 #include <i3/ipc.h>
1815
1916 /*
2017 * Reads a message from the given socket file descriptor and stores its length
66 */
77 #include "libi3.h"
88
9 #include <string.h>
10 #include <stdlib.h>
11 #include <unistd.h>
9 #include <i3/ipc.h>
1210 #include <stdint.h>
13 #include <err.h>
14 #include <errno.h>
15
16 #include <i3/ipc.h>
1711
1812 /*
1913 * Formats a message (payload) of the given size and type and sends it to i3 via
77 #include "libi3.h"
88
99 #include <string.h>
10 #include <stdbool.h>
1110
1211 /*
1312 * Returns true if this version of i3 is a debug build (anything which is not a
66 */
77 #include "libi3.h"
88
9 #include <stdio.h>
9 #include <math.h>
10 #include <stdlib.h>
1011 #include <string.h>
11 #include <stdbool.h>
12 #include <limits.h>
13 #include <stdlib.h>
14 #include <math.h>
1512
1613 #include <xcb/xcb.h>
1714 #include <xcb/xcb_aux.h>
66 */
77 #include "libi3.h"
88
9 #include <string.h>
10 #include <stdlib.h>
11 #include <stdarg.h>
12 #include <unistd.h>
13 #include <stdio.h>
149 #include <err.h>
1510 #include <errno.h>
11 #include <stdlib.h>
12 #include <string.h>
13 #include <unistd.h>
1614
1715 /*
1816 * The s* functions (safe) are wrappers around malloc, strdup, …, which exits if one of
1010 */
1111 #include "libi3.h"
1212
13 #include <glib.h>
1314 #include <stdlib.h>
1415 #include <string.h>
15
16 #include <glib.h>
1716
1817 struct _i3String {
1918 char *utf8;
66 */
77 #include "libi3.h"
88
9 #include <sys/types.h>
109 #include <string.h>
1110
1211 #ifndef HAVE_strndup
77 #include "libi3.h"
88
99 #include <err.h>
10 #include <errno.h>
1110 #include <iconv.h>
1211 #include <stdlib.h>
1312 #include <string.h>
00 #!/bin/zsh
11 # This script is used to prepare a new release of i3.
22
3 export RELEASE_VERSION="4.17"
4 export PREVIOUS_VERSION="4.16"
3 export RELEASE_VERSION="4.19"
4 export PREVIOUS_VERSION="4.18"
55 export RELEASE_BRANCH="next"
66
77 if [ ! -e "../i3.github.io" ]
6868
6969 echo "Differences in the release tarball file lists:"
7070
71 diff -u \
71 diff --color -u \
7272 <(tar tf ../i3-${PREVIOUS_VERSION}.tar.bz2 | sed "s,i3-${PREVIOUS_VERSION}/,,g" | sort) \
73 <(tar tf i3-${RELEASE_VERSION}.tar.bz2 | sed "s,i3-${RELEASE_VERSION}/,,g" | sort) \
74 | colordiff
75
73 <(tar tf i3-${RELEASE_VERSION}.tar.bz2 | sed "s,i3-${RELEASE_VERSION}/,,g" | sort)
7674
7775 gpg --armor -b i3-${RELEASE_VERSION}.tar.bz2
7876
129127 EOT
130128
131129 CONTAINER_NAME=$(echo "i3-${TMPDIR}" | sed 's,/,,g')
132 docker build -t i3 .
130 docker build --no-cache -t i3 .
133131 for file in $(docker run --name "${CONTAINER_NAME}" i3 /bin/sh -c "ls /usr/src/i3*_${RELEASE_VERSION}*")
134132 do
135133 docker cp "${CONTAINER_NAME}:${file}" ${TMPDIR}/debian/
77 */
88 #include "all.h"
99
10 #include <math.h>
11
12 #include <xkbcommon/xkbcommon-x11.h>
1013 #include <xkbcommon/xkbcommon.h>
11 #include <xkbcommon/xkbcommon-x11.h>
1214
1315 static struct xkb_context *xkb_context;
1416 static struct xkb_keymap *xkb_keymap;
99 #include "all.h"
1010
1111 #include <time.h>
12 #include <math.h>
13
14 #include <xcb/xcb_icccm.h>
15
16 #include <X11/XKBlib.h>
1712
1813 typedef enum { CLICK_BORDER = 0,
1914 CLICK_DECORATION = 1,
77 *
88 */
99 #include "all.h"
10
10 #include "shmlog.h"
11
12 #include <fcntl.h>
1113 #include <stdint.h>
12 #include <float.h>
13 #include <stdarg.h>
1414 #include <unistd.h>
15 #include <fcntl.h>
16
17 #include "shmlog.h"
1815
1916 // Macros to make the YAJL API a bit easier to use.
2017 #define y(x, ...) (cmd_output->json_gen != NULL ? yajl_gen_##x(cmd_output->json_gen, ##__VA_ARGS__) : 0)
2323 *
2424 */
2525 #include "all.h"
26
27 #include <stdio.h>
28 #include <stdlib.h>
29 #include <string.h>
30 #include <unistd.h>
31 #include <stdbool.h>
32 #include <stdint.h>
3326
3427 // Macros to make the YAJL API a bit easier to use.
3528 #define y(x, ...) (command_output.json_gen != NULL ? yajl_gen_##x(command_output.json_gen, ##__VA_ARGS__) : 0)
99 *
1010 */
1111 #include "all.h"
12
1312 #include "yajl_utils.h"
1413
1514 static void con_on_remove_child(Con *con);
9190 FREE(mark->name);
9291 FREE(mark);
9392 }
93 DLOG("con %p freed\n", con);
9494 free(con);
95 DLOG("con %p freed\n", con);
9695 }
9796
9897 static void _con_attach(Con *con, Con *parent, Con *previous, bool ignore_focus) {
77 *
88 */
99 #include "all.h"
10
11 #include <float.h>
12 #include <stdarg.h>
1310
1411 /*******************************************************************************
1512 * Criteria functions.
2424 */
2525 #include "all.h"
2626
27 #include <fcntl.h>
28 #include <stdbool.h>
29 #include <stdint.h>
2730 #include <stdio.h>
2831 #include <stdlib.h>
2932 #include <string.h>
30 #include <unistd.h>
31 #include <stdbool.h>
32 #include <stdint.h>
33 #include <sys/stat.h>
3334 #include <sys/types.h>
3435 #include <sys/wait.h>
35 #include <sys/stat.h>
36 #include <fcntl.h>
36 #include <unistd.h>
37
3738 #include <xcb/xcb_xrm.h>
3839
3940 // Macros to make the YAJL API a bit easier to use.
99 */
1010 #include "all.h"
1111
12 #include <sys/types.h>
13 #include <sys/stat.h>
14 #include <sys/wait.h>
15 #include <sys/socket.h>
16 #include <sys/un.h>
1712 #include <fcntl.h>
1813 #include <time.h>
14 #include <unistd.h>
1915
2016 static bool human_readable_key, loaded_config_file_name_key;
2117 static char *human_readable_version, *loaded_config_file_name;
77 *
88 */
99 #include "all.h"
10
11 #include <math.h>
1012
1113 #ifndef MAX
1214 #define MAX(x, y) ((x) > (y) ? (x) : (y))
220222 }
221223 }
222224
223 void floating_enable(Con *con, bool automatic) {
225 bool floating_enable(Con *con, bool automatic) {
224226 bool set_focus = (con == focused);
225227
226228 if (con_is_docked(con)) {
227229 LOG("Container is a dock window, not enabling floating mode.\n");
228 return;
230 return false;
229231 }
230232
231233 if (con_is_floating(con)) {
232234 LOG("Container is already in floating mode, not doing anything.\n");
233 return;
235 return false;
234236 }
235237
236238 if (con->type == CT_WORKSPACE) {
237239 LOG("Container is a workspace, not enabling floating mode.\n");
238 return;
240 return false;
239241 }
240242
241243 Con *focus_head_placeholder = NULL;
418420
419421 floating_set_hint_atom(nc, true);
420422 ipc_send_window_event("floating", con);
423 return true;
421424 }
422425
423426 void floating_disable(Con *con) {
99 */
1010 #include "all.h"
1111
12 #include <sys/time.h>
1213 #include <time.h>
13 #include <float.h>
14 #include <sys/time.h>
14
1515 #include <xcb/randr.h>
1616 #define SN_API_NOT_YET_FROZEN 1
1717 #include <libsn/sn-monitor.h>
840840 * let's float it and make it sticky. */
841841 DLOG("The window was requested to be visible on all workspaces, making it sticky and floating.\n");
842842
843 floating_enable(con, false);
844 con->floating = FLOATING_AUTO_ON;
845
846 con->sticky = true;
847 ewmh_update_sticky(con->window->id, true);
848 output_push_sticky_windows(focused);
843 if (floating_enable(con, false)) {
844 con->floating = FLOATING_AUTO_ON;
845
846 con->sticky = true;
847 ewmh_update_sticky(con->window->id, true);
848 output_push_sticky_windows(focused);
849 }
849850 } else {
850851 Con *ws = ewmh_get_workspace_by_index(index);
851852 if (ws == NULL) {
66 * ipc.c: UNIX domain socket IPC (initialization, client handling, protocol).
77 *
88 */
9
910 #include "all.h"
10
1111 #include "yajl_utils.h"
1212
13 #include <ev.h>
14 #include <fcntl.h>
15 #include <libgen.h>
16 #include <locale.h>
1317 #include <stdint.h>
1418 #include <sys/socket.h>
1519 #include <sys/un.h>
16 #include <fcntl.h>
17 #include <libgen.h>
18 #include <ev.h>
20 #include <unistd.h>
21
1922 #include <yajl/yajl_gen.h>
2023 #include <yajl/yajl_parse.h>
2124
99 */
1010 #include "all.h"
1111
12 #include <yajl/yajl_common.h>
13 #include <yajl/yajl_gen.h>
12 #include <locale.h>
13
1414 #include <yajl/yajl_parse.h>
15 #include <yajl/yajl_version.h>
1615
1716 /* TODO: refactor the whole parsing thing */
1817
88 */
99 #include <config.h>
1010
11 #include "all.h"
12 #include "shmlog.h"
13
14 #include <errno.h>
15 #include <fcntl.h>
1116 #include <stdarg.h>
17 #include <stdbool.h>
1218 #include <stdio.h>
19 #include <stdlib.h>
1320 #include <string.h>
14 #include <stdbool.h>
15 #include <stdlib.h>
21 #include <sys/mman.h>
22 #include <sys/stat.h>
1623 #include <sys/time.h>
1724 #include <unistd.h>
18 #include <fcntl.h>
19 #include <sys/mman.h>
20 #include <sys/stat.h>
21 #include <errno.h>
2225 #if !defined(__OpenBSD__)
2326 #include <pthread.h>
2427 #endif
25
26 #include "util.h"
27 #include "log.h"
28 #include "i3.h"
29 #include "libi3.h"
30 #include "shmlog.h"
3128
3229 #if defined(__APPLE__)
3330 #include <sys/sysctl.h>
77 *
88 */
99 #include "all.h"
10 #include "shmlog.h"
1011
1112 #include <ev.h>
1213 #include <fcntl.h>
14 #include <getopt.h>
15 #include <libgen.h>
16 #include <locale.h>
17 #include <signal.h>
18 #include <sys/mman.h>
19 #include <sys/resource.h>
20 #include <sys/socket.h>
21 #include <sys/stat.h>
22 #include <sys/time.h>
1323 #include <sys/types.h>
14 #include <sys/socket.h>
1524 #include <sys/un.h>
16 #include <sys/time.h>
17 #include <sys/resource.h>
18 #include <sys/mman.h>
19 #include <sys/stat.h>
20 #include <libgen.h>
21 #include "shmlog.h"
25 #include <unistd.h>
2226
2327 #ifdef I3_ASAN_ENABLED
2428 #include <sanitizer/lsan_interface.h>
77 *
88 */
99 #include "all.h"
10
11 #include "yajl_utils.h"
12
13 #include <yajl/yajl_gen.h>
1410
1511 /*
1612 * Match frame and window depth. This is needed because X will refuse to reparent a
536532 * was not specified */
537533 bool automatic_border = (motif_border_style == BS_NORMAL);
538534
539 floating_enable(nc, automatic_border);
540 nc->floating = FLOATING_AUTO_ON;
535 if (floating_enable(nc, automatic_border)) {
536 nc->floating = FLOATING_AUTO_ON;
537 }
541538 }
542539
543540 /* explicitly set the border width to the default */
1111 #include "all.h"
1212
1313 #include <time.h>
14
1415 #include <xcb/randr.h>
1516
1617 /* Pointer to the result of the query for primary output */
88 *
99 */
1010 #include "all.h"
11
12 #include <math.h>
1113
1214 /* Forward declarations */
1315 static int *precalculate_sizes(Con *con, render_params *p);
2727 #define _GNU_SOURCE
2828 #endif
2929
30 #include "sd-daemon.h"
31
32 #include <errno.h>
33 #include <netinet/in.h>
34 #include <stdarg.h>
35 #include <stddef.h>
36 #include <stdio.h>
37 #include <stdlib.h>
38 #include <string.h>
39 #include <sys/fcntl.h>
40 #include <sys/socket.h>
41 #include <sys/stat.h>
3042 #include <sys/types.h>
31 #include <sys/stat.h>
32 #include <sys/socket.h>
3343 #include <sys/un.h>
34 #include <sys/fcntl.h>
35 #include <netinet/in.h>
36 #include <stdlib.h>
37 #include <errno.h>
3844 #include <unistd.h>
39 #include <string.h>
40 #include <stdarg.h>
41 #include <stdio.h>
42 #include <stddef.h>
43
44 #include "sd-daemon.h"
4545
4646 int sd_listen_fds(int unset_environment) {
4747 int r, fd;
66 */
77 #include "all.h"
88
9 #include <ev.h>
10 #include <iconv.h>
119 #include <signal.h>
1210 #include <sys/wait.h>
13
14 #include <xcb/xcb_event.h>
15
16 #include <X11/keysym.h>
11 #include <unistd.h>
1712
1813 typedef struct dialog_t {
1914 xcb_window_t id;
1010 *
1111 */
1212 #include "all.h"
13
1413 #include "sd-daemon.h"
1514
15 #include <paths.h>
1616 #include <sys/types.h>
1717 #include <sys/wait.h>
18 #include <paths.h>
18 #include <unistd.h>
1919
2020 #define SN_API_NOT_YET_FROZEN 1
2121 #include <libsn/sn-launcher.h>
99 */
1010 #include "all.h"
1111
12 #include <ctype.h>
13 #include <fcntl.h>
14 #include <inttypes.h>
15 #include <libgen.h>
16 #include <locale.h>
1217 #include <sys/wait.h>
13 #include <stdarg.h>
18 #include <unistd.h>
1419 #if defined(__OpenBSD__)
1520 #include <sys/cdefs.h>
1621 #endif
17 #include <fcntl.h>
18 #include <pwd.h>
19 #include <yajl/yajl_version.h>
20 #include <libgen.h>
21 #include <ctype.h>
22
23 #define SN_API_NOT_YET_FROZEN 1
24 #include <libsn/sn-launcher.h>
2522
2623 int min(int a, int b) {
2724 return (a < b ? a : b);
77 *
88 */
99 #include "all.h"
10
11 #include <math.h>
1012
1113 /*
1214 * Frees an i3Window and all its members.
88 *
99 */
1010 #include "all.h"
11
12 #include <unistd.h>
1113
1214 #ifndef MAX
1315 #define MAX(x, y) ((x) > (y) ? (x) : (y))
88 */
99 #include <config.h>
1010
11 #include "all.h"
12
1113 #include <assert.h>
1214 #include <err.h>
15
1316 #include <xcb/xcb_cursor.h>
14
15 #include "i3.h"
16 #include "xcb.h"
17 #include "xcursor.h"
1817
1918 static xcb_cursor_context_t *ctx;
2019 static xcb_cursor_t cursors[XCURSOR_CURSOR_MAX];
1515
1616 #include <ev.h>
1717 #include <fcntl.h>
18 #include <getopt.h>
19 #include <libgen.h>
20 #include <sys/mman.h>
21 #include <sys/resource.h>
22 #include <sys/socket.h>
23 #include <sys/stat.h>
24 #include <sys/time.h>
1825 #include <sys/types.h>
19 #include <sys/socket.h>
2026 #include <sys/un.h>
21 #include <sys/time.h>
22 #include <sys/resource.h>
23 #include <sys/mman.h>
24 #include <sys/stat.h>
2527 #include <sys/wait.h>
26 #include <libgen.h>
28 #include <unistd.h>
2729
2830 static void uds_connection_cb(EV_P_ ev_io *w, int revents);
2931 static void read_client_setup_request_cb(EV_P_ ev_io *w, int revents);
0 #!perl
1 # vim:ts=4:sw=4:expandtab
2 #
3 # Please read the following documents before working on tests:
4 # • https://build.i3wm.org/docs/testsuite.html
5 # (or docs/testsuite)
6 #
7 # • https://build.i3wm.org/docs/lib-i3test.html
8 # (alternatively: perldoc ./testcases/lib/i3test.pm)
9 #
10 # • https://build.i3wm.org/docs/ipc.html
11 # (or docs/ipc)
12 #
13 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
14 # (unless you are already familiar with Perl)
15 #
16 # Verify that _NET_WM_DESKTOP sticky requests do not conflict with dock
17 # clients, resulting in a crash
18 # Ticket: #4039
19 # Bug still in: 4.18-238-g4d55bba7f
20 use i3test;
21
22 sub send_sticky_request {
23 my ($win) = @_;
24
25 my $msg = pack "CCSLLLLLL",
26 X11::XCB::CLIENT_MESSAGE, # response_type
27 32, # format
28 0, # sequence
29 $win->id, # window
30 $x->atom(name => '_NET_WM_DESKTOP')->id, # message type
31 hex '0xFFFFFFFF', # data32[0] = NET_WM_DESKTOP_ALL
32 0, # data32[1]
33 0, # data32[2]
34 0, # data32[3]
35 0; # data32[4]
36
37 $x->send_event(0, $x->get_root_window(), X11::XCB::EVENT_MASK_SUBSTRUCTURE_REDIRECT, $msg);
38 }
39
40 # Test the normal functionality first
41 my $ws = fresh_workspace;
42 my $win = open_window;
43
44 is(@{get_ws($ws)->{floating_nodes}}, 0, 'No floating windows yet');
45 send_sticky_request($win);
46 sync_with_i3;
47
48 is(@{get_ws($ws)->{floating_nodes}}, 1, 'One floating (sticky) window');
49 $ws = fresh_workspace;
50 is(@{get_ws($ws)->{floating_nodes}}, 1, 'Sticky window in new workspace');
51
52 # See #4039
53 kill_all_windows;
54 $win = open_window({
55 window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK')
56 });
57
58 send_sticky_request($win);
59 sync_with_i3;
60 is(@{get_ws($ws)->{floating_nodes}}, 0, 'Dock client did not get sticky/floating');
61
62 # Cause a ConfigureRequest by setting the window’s position/size.
63 my ($a, $t) = $win->rect;
64 $win->rect(X11::XCB::Rect->new(x => 0, y => 0, width => $a->width, height => $a->height));
65
66 does_i3_live;
67 is(@{get_ws($ws)->{floating_nodes}}, 0, 'Dock client still not sticky/floating');
68
69 done_testing;