diff --git a/.build.yml b/.build.yml index 1519618e..4f0c2cf6 100644 --- a/.build.yml +++ b/.build.yml @@ -27,7 +27,7 @@ sources: tasks: - setup: | cd rofi - meson setup builddir . + meson setup builddir . -Db_lto=true - build: | ninja -C rofi/builddir - test: | @@ -38,4 +38,4 @@ tasks: - dist: | ninja -C rofi/builddir dist artifacts: - - rofi/builddir/meson-dist/rofi-1.7.3-dev.tar.xz + - rofi/builddir/meson-dist/rofi-1.7.5-dev.tar.xz diff --git a/include/xcb.h b/include/xcb.h index 2b847645..f681eaae 100644 --- a/include/xcb.h +++ b/include/xcb.h @@ -29,7 +29,6 @@ #define ROFI_XCB_H #include -#include #ifdef XCB_IMDKIT #include #endif diff --git a/source/history.c b/source/history.c index 56c68e2d..cc992dae 100644 --- a/source/history.c +++ b/source/history.c @@ -24,6 +24,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "config.h" #include "history.h" #include "rofi.h" diff --git a/source/keyb.c b/source/keyb.c index a3eac3d1..4ae01753 100644 --- a/source/keyb.c +++ b/source/keyb.c @@ -24,11 +24,12 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "config.h" #include "rofi.h" #include "xrmoptions.h" #include +#include #include -#include "nkutils-bindings.h" typedef struct { guint id; @@ -372,7 +373,7 @@ static const gchar *mouse_default_bindings[] = { [MOUSE_DCLICK_UP] = "!MouseDPrimary", }; -void abe_list_all_bindings(gboolean is_term ) { +void abe_list_all_bindings(gboolean is_term) { int length = 0; for (gsize i = 0; i < G_N_ELEMENTS(rofi_bindings); ++i) { @@ -383,9 +384,10 @@ void abe_list_all_bindings(gboolean is_term ) { for (gsize i = 0; i < G_N_ELEMENTS(rofi_bindings); ++i) { ActionBindingEntry *b = &rofi_bindings[i]; if (is_term) { - printf("%s%*s%s - %s\n", color_bold,length, b->name, color_reset,b->binding); + printf("%s%*s%s - %s\n", color_bold, length, b->name, color_reset, + b->binding); } else { - printf("%*s - %s\n", length, b->name, b->binding); + printf("%*s - %s\n", length, b->name, b->binding); } } } @@ -439,22 +441,25 @@ gboolean parse_keys_abe(NkBindings *bindings) { if (!nk_bindings_add_binding(bindings, b->scope, entry, binding_check_action, binding_trigger_action, GUINT_TO_POINTER(b->id), NULL, &error)) { - if ( error->code == NK_BINDINGS_ERROR_ALREADY_REGISTERED && error->domain == NK_BINDINGS_ERROR){ - char *str = g_markup_printf_escaped( - "Failed to set binding %s for: %s (%s):\n\tBinding `%s` is already bound.\n" - "\tExecute rofi -list-keybindings to get the current list of configured bindings.\n", - b->binding, b->comment, b->name, entry); - g_string_append(error_msg, str); - g_free(str); - } else { - char *str = g_markup_printf_escaped( - "Failed to set binding %s for: %s (%s):\n\t%s\n", - b->binding, b->comment, b->name, error->message); - g_string_append(error_msg, str); - g_free(str); - } + if (error->code == NK_BINDINGS_ERROR_ALREADY_REGISTERED && + error->domain == NK_BINDINGS_ERROR) { + char *str = g_markup_printf_escaped( + "Failed to set binding %s for: %s (%s):\n\tBinding `%s` is already " + "bound.\n" + "\tExecute rofi -list-keybindings to get the current list " + "of configured bindings.\n", + b->binding, b->comment, b->name, entry); + g_string_append(error_msg, str); + g_free(str); + } else { + char *str = g_markup_printf_escaped( + "Failed to set binding %s for: %s (%s):\n\t%s\n", + b->binding, b->comment, b->name, error->message); + g_string_append(error_msg, str); + g_free(str); + } g_clear_error(&error); } } diff --git a/source/modes/dmenu.c b/source/modes/dmenu.c index d6431f55..f5b667a3 100644 --- a/source/modes/dmenu.c +++ b/source/modes/dmenu.c @@ -27,6 +27,7 @@ /** The log domain of this dialog. */ #define G_LOG_DOMAIN "Modes.DMenu" +#include "config.h" #include "modes/dmenu.h" #include "helper.h" diff --git a/source/modes/drun.c b/source/modes/drun.c index c0bab187..fc4d990b 100644 --- a/source/modes/drun.c +++ b/source/modes/drun.c @@ -28,7 +28,7 @@ /** The log domain of this dialog. */ #define G_LOG_DOMAIN "Modes.DRun" -#include +#include "config.h" #ifdef ENABLE_DRUN #include #include diff --git a/source/modes/filebrowser.c b/source/modes/filebrowser.c index 21ae13b9..df3c8c12 100644 --- a/source/modes/filebrowser.c +++ b/source/modes/filebrowser.c @@ -23,6 +23,7 @@ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include "config.h" #include #include #include diff --git a/source/modes/help-keys.c b/source/modes/help-keys.c index 3659209d..26b9b617 100644 --- a/source/modes/help-keys.c +++ b/source/modes/help-keys.c @@ -25,7 +25,7 @@ * */ -#include +#include "config.h" #include #include diff --git a/source/modes/run.c b/source/modes/run.c index 1393471f..198673e1 100644 --- a/source/modes/run.c +++ b/source/modes/run.c @@ -33,7 +33,7 @@ /** The log domain of this dialog. */ #define G_LOG_DOMAIN "Modes.Run" -#include +#include "config.h" #include #include diff --git a/source/modes/ssh.c b/source/modes/ssh.c index 261e5c3c..5a1867ef 100644 --- a/source/modes/ssh.c +++ b/source/modes/ssh.c @@ -35,7 +35,7 @@ */ #define G_LOG_DOMAIN "Modes.Ssh" -#include +#include "config.h" #include #include #include diff --git a/source/modes/window.c b/source/modes/window.c index 39070b74..1ff3a98d 100644 --- a/source/modes/window.c +++ b/source/modes/window.c @@ -28,7 +28,7 @@ /** The log domain of this dialog. */ #define G_LOG_DOMAIN "Modes.Window" -#include +#include "config.h" #ifdef WINDOW_MODE diff --git a/source/widgets/container.c b/source/widgets/container.c index b5f6656c..a97ab740 100644 --- a/source/widgets/container.c +++ b/source/widgets/container.c @@ -27,6 +27,7 @@ /** The log domain of this widget. */ #define G_LOG_DOMAIN "Widgets.Container" +#include "config.h" #include "widgets/container.h" #include "theme.h" diff --git a/source/widgets/icon.c b/source/widgets/icon.c index a669d220..0900fff4 100644 --- a/source/widgets/icon.c +++ b/source/widgets/icon.c @@ -27,6 +27,7 @@ /** The log domain of this widget. */ #define G_LOG_DOMAIN "Widgets.Icon" +#include "config.h" #include "widgets/icon.h" #include "theme.h" diff --git a/source/widgets/listview.c b/source/widgets/listview.c index fe2cb496..0668b8da 100644 --- a/source/widgets/listview.c +++ b/source/widgets/listview.c @@ -25,7 +25,7 @@ * */ -#include +#include "config.h" #include #include #include diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index 758e32d5..e8f178ce 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -25,6 +25,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "config.h" #include "widgets/textbox.h" #include "helper-theme.h" diff --git a/source/widgets/widget.c b/source/widgets/widget.c index 29812a61..bc2be61e 100644 --- a/source/widgets/widget.c +++ b/source/widgets/widget.c @@ -24,6 +24,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "config.h" #include "widgets/widget.h" #include "theme.h" diff --git a/source/xcb.c b/source/xcb.c index db9e344a..6c8515cb 100644 --- a/source/xcb.c +++ b/source/xcb.c @@ -1187,6 +1187,7 @@ static gboolean x11_button_to_nk_bindings_scroll(guint32 x11_button, static void rofi_key_press_event_handler(xcb_key_press_event_t *xkpe, RofiViewState *state) { gchar *text; + g_log("IMDKit", G_LOG_LEVEL_DEBUG, "press handler"); xcb->last_timestamp = xkpe->time; if (config.xserver_i300_workaround) { @@ -1371,6 +1372,7 @@ static void main_loop_x11_event_handler_view(xcb_generic_event_t *event) { xcb_key_press_event_t *xkpe = (xcb_key_press_event_t *)event; #ifdef XCB_IMDKIT if (xcb->ic) { + g_log("IMDKit", G_LOG_LEVEL_DEBUG, "input xim"); xcb_xim_forward_event(xcb->im, xcb->ic, xkpe); } else #endif diff --git a/test/helper-config-cmdline-parser.c b/test/helper-config-cmdline-parser.c index 4cbfe78f..7c3048d4 100644 --- a/test/helper-config-cmdline-parser.c +++ b/test/helper-config-cmdline-parser.c @@ -24,6 +24,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "config.h" #include "display.h" #include "rofi-icon-fetcher.h" diff --git a/test/helper-expand.c b/test/helper-expand.c index 60c0079e..e80d1a24 100644 --- a/test/helper-expand.c +++ b/test/helper-expand.c @@ -24,7 +24,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ - +#include "config.h" #include "display.h" #include "rofi-icon-fetcher.h" #include "rofi.h" diff --git a/test/helper-test.c b/test/helper-test.c index 4e81b937..1aca07e7 100644 --- a/test/helper-test.c +++ b/test/helper-test.c @@ -25,6 +25,8 @@ * */ +#include "config.h" + #include "display.h" #include "rofi-icon-fetcher.h" #include "rofi.h" diff --git a/test/textbox-test.c b/test/textbox-test.c index 737db4f0..0ddfc50f 100644 --- a/test/textbox-test.c +++ b/test/textbox-test.c @@ -25,6 +25,7 @@ * */ +#include "config.h" #include #include