Merge remote-tracking branch 'upstream/next' into wayland

This commit is contained in:
lbonn 2024-02-27 13:29:54 +01:00
commit 54a2c45120
7 changed files with 23 additions and 25 deletions

View file

@ -1084,7 +1084,7 @@ static void get_apps(DRunModePrivateData *pd) {
g_free(cache_file);
}
static void drun_mode_parse_entry_fields() {
static void drun_mode_parse_entry_fields(void) {
char *savept = NULL;
// Make a copy, as strtok will modify it.
char *switcher_str = g_strdup(config.drun_match_fields);
@ -1120,7 +1120,7 @@ static void drun_mode_parse_entry_fields() {
g_free(switcher_str);
}
static void drun_mode_parse_display_format() {
static void drun_mode_parse_display_format(void) {
for (int i = 0; i < DRUN_MATCH_NUM_FIELDS; i++) {
if (matching_entry_fields[i].enabled_display)
continue;

View file

@ -446,12 +446,17 @@ static ModeMode run_mode_result(Mode *sw, int mretv, char **input,
&path);
if (retv == MODE_EXIT) {
if (path == NULL) {
exec_cmd(rmpd->cmd_list[rmpd->selected_line].entry, run_in_term);
} else {
char *arg = g_strdup_printf(
"%s '%s'", rmpd->cmd_list[rmpd->selected_line].entry, path);
char *arg = g_shell_quote(rmpd->cmd_list[rmpd->selected_line].entry);
exec_cmd(arg, run_in_term);
g_free(arg);
} else {
char *earg = g_shell_quote(rmpd->cmd_list[rmpd->selected_line].entry);
char *epath = g_shell_quote(path);
char *arg = g_strdup_printf("%s %s", earg, epath);
exec_cmd(arg, run_in_term);
g_free(arg);
g_free(earg);
g_free(epath);
}
}
g_free(path);
@ -460,9 +465,11 @@ static ModeMode run_mode_result(Mode *sw, int mretv, char **input,
}
if ((mretv & MENU_OK) && rmpd->cmd_list[selected_line].entry != NULL) {
if (!exec_cmd(rmpd->cmd_list[selected_line].entry, run_in_term)) {
char *earg = g_shell_quote(rmpd->cmd_list[selected_line].entry);
if (!exec_cmd(earg, run_in_term)) {
retv = RELOAD_DIALOG;
}
g_free(earg);
} else if ((mretv & MENU_CUSTOM_INPUT) && *input != NULL &&
*input[0] != '\0') {
if (!exec_cmd(*input, run_in_term)) {

View file

@ -163,7 +163,7 @@ winlist *cache_client = NULL;
*
* @returns A new window list.
*/
static winlist *winlist_new() {
static winlist *winlist_new(void) {
winlist *l = g_malloc(sizeof(winlist));
l->len = 0;
l->array = g_malloc_n(WINLIST + 1, sizeof(xcb_window_t));
@ -472,7 +472,7 @@ static int window_match(const Mode *sw, rofi_int_matcher **tokens,
return match;
}
static void window_mode_parse_fields() {
static void window_mode_parse_fields(void) {
window_matching_fields_parsed = TRUE;
char *savept = NULL;
// Make a copy, as strtok will modify it.

View file

@ -29,7 +29,6 @@
#define G_LOG_DOMAIN "Theme"
#include "config.h"
#include <errno.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@ -601,11 +600,6 @@ void rofi_theme_print(ThemeWidget *widget) {
}
}
/**
* Main lex parser.
*/
int yyparse();
/**
* Destroy the internal of lex parser.
*/

View file

@ -29,7 +29,6 @@
#define G_LOG_DOMAIN "View"
#include <config.h>
#include <errno.h>
#include <locale.h>
#include <signal.h>
#include <stdint.h>
@ -50,7 +49,6 @@
#include "helper-theme.h"
#include "helper.h"
#include "mode.h"
#include "xrmoptions.h"
#include "view-internal.h"
#include "view.h"
@ -1822,13 +1820,12 @@ int rofi_view_error_dialog(const char *msg, int markup) {
return TRUE;
}
static int rofi_thread_workers_sort(gconstpointer a,gconstpointer b, gpointer data G_GNUC_UNUSED)
{
static int rofi_thread_workers_sort(gconstpointer a, gconstpointer b,
gpointer data G_GNUC_UNUSED) {
thread_state *tsa = (thread_state *)a;
thread_state *tsb = (thread_state *)b;
// lower number is lower priority.. a is sorted above is a > b.
return tsa->priority-tsb->priority;
return tsa->priority - tsb->priority;
}
void rofi_view_workers_initialize(void) {

View file

@ -559,7 +559,7 @@ static int x11_is_extension_present(const char *extension) {
return present;
}
static void x11_build_monitor_layout_xinerama() {
static void x11_build_monitor_layout_xinerama(void) {
xcb_xinerama_query_screens_cookie_t screens_cookie =
xcb_xinerama_query_screens_unchecked(xcb->connection);
@ -590,7 +590,7 @@ static void x11_build_monitor_layout_xinerama() {
free(screens_reply);
}
static void x11_build_monitor_layout() {
static void x11_build_monitor_layout(void) {
if (xcb->monitors) {
return;
}

View file

@ -80,7 +80,7 @@ gboolean config_parse_set_property(G_GNUC_UNUSED const Property *p,
void rofi_add_error_message(G_GNUC_UNUSED GString *msg) {}
void rofi_add_warning_message(G_GNUC_UNUSED GString *msg) {}
void rofi_view_queue_redraw() {}
void rofi_view_queue_redraw(void) {}
void rofi_view_get_current_monitor(G_GNUC_UNUSED int *width,
G_GNUC_UNUSED int *height) {}
int rofi_view_error_dialog(const char *msg, G_GNUC_UNUSED int markup) {