Commit Graph

18 Commits (03cbf0a7666f063d8c23affa0f83db3388410ebd)

Author SHA1 Message Date
Daniel Mueller 865bd462b4
do not check for NULL in FREE macro
free(3) is safe to invoke on a NULL pointer, in which case no action is
taken. This change adjusts the FREE macros to omit this unnecessary
check.
2017-11-23 15:41:33 -08:00
Michael Stapelberg f354f53435 Ensure all *.[ch] files include config.h
Including config.h is necessary to get e.g. the _GNU_SOURCE define and
any other definitions that autoconf declares. Hence, config.h needs to
be included as the first header in each file.

This is done either via:
1. Including "common.h" (i3bar)
2. Including "libi3.h"
3. Including "all.h" (i3)
4. Including <config.h> directly

Also remove now-unused I3__FILE__, add copyright/license statement
where missing and switch include/all.h to #pragma once.
2016-10-23 21:09:24 +02:00
Michael Stapelberg 4c06e7a573 clang-format-3.5 **/*.h **/*.c
This should be the last commit that formats a big bunch of files. From
here on, whenever I merge patches, I’ll run clang-format like described
in the title.
2014-06-19 11:20:32 +02:00
Alexander Kedrik e2ebe3e2ae Use #pragma once
#pragma once is safer and simpler. According to Wikipedia it's supported by all major compilers.
2014-01-01 15:06:57 +01:00
Michael Stapelberg a01bac13fe don’t use reserved identifiers for include guards (left-overs)
fixes #804
2012-09-22 13:31:08 +02:00
Fernando Tarlá Cardoso Lemos fb11cc2d14 Consolidate all convert_* functions into libi3.
Some minor fixes along the way as well. Very minor stuff, unlikely
to ever be visible to the user.
2011-11-16 20:54:30 +00:00
Michael Stapelberg f4469eee0b get rid of xcb.c in all i3-* tools
open_input_window was slightly different for each of them, so it made no sense
to generalize it (then we would end up with a thin and useless wrapper).
2011-10-23 23:20:57 +01:00
Michael Stapelberg a58018cf66 Add libi3/load_font, use it everywhere
…except for i3bar, which needs slightly more information about the font
2011-10-23 22:37:11 +01:00
Michael Stapelberg c2d04116d4 i3-input: Remove unused get_mod_mask from xcb.c 2011-10-23 19:37:28 +01:00
Michael Stapelberg 6dc6ba11fc Eliminate xcb_change_gc_single everywhere with C99 2011-10-23 18:06:25 +01:00
Michael Stapelberg cb9bbcfccf Move get_colorpixel to libi3, use it everywhere else 2011-10-23 17:38:21 +01:00
Michael Stapelberg 4f57d49318 add libi3/ipc_connect, use it in i3-config-wizard, i3-input, i3bar 2011-10-23 17:18:14 +01:00
Michael Stapelberg d87b0f13a0 i3-input: use IPC functions from libi3 2011-10-23 13:15:20 +01:00
Michael Stapelberg 7b01bc5eb7 Bugfix: use the global root variable, don’t get the first one (Thanks quaec)
The case of an X11 server having multiple displays is handled correctly by the
code in src/mainx.c. However, due to some functions not being correctly
refactored and still getting the first screen (and also the first root window)
from the XCB connection, i3 was operating on the wrong root window.
2011-01-28 00:41:53 +01:00
Michael Stapelberg cd2ee61ee8 fix some memory leaks when user passes command line arguments twice (Thanks Tiago) 2011-01-12 10:12:24 +01:00
Michael Stapelberg 85730d6892 Fix numlock state
Apparantly, after activating numlock once, the numlock modifier
stays turned on (use xev(1) to verify). So, to resolve useful
keysyms, we remove the numlock flag from the event state. What
currently does not work is actually using your keypad.
2010-03-24 03:28:38 +01:00
Michael Stapelberg 3ada8f326c Implement vim-like marks
Commands are 'mark' and 'goto'. Both can be used either directly,
like 'mark a' and 'goto a', or interactively (just 'mark'). For
interactive mode, i3-input must be installed and in your PATH.
2009-09-20 16:54:29 +02:00
Michael Stapelberg ca9b52bfcc Add initial version of i3-input, an interactive tool for sending IPC commands 2009-09-20 15:44:14 +02:00