build: enable address/undefined sanitizer build target and add -Wpedantic -Wshadow -fstack-protector-strong flags
This commit is contained in:
@@ -110,6 +110,7 @@ extern ICCCMAtoms icccm;
|
||||
extern MiscAtoms misc_atoms;
|
||||
|
||||
void atoms_init(Display *display);
|
||||
void atoms_cleanup(void);
|
||||
|
||||
void atoms_setup_ewmh(void);
|
||||
void atoms_update_client_list(void);
|
||||
|
||||
@@ -174,6 +174,10 @@ typedef struct {
|
||||
|
||||
bool is_alt_tabbing;
|
||||
Client *alt_tab_client;
|
||||
|
||||
bool desktop_shown;
|
||||
Window desktop_minimized[MAX_CLIENTS];
|
||||
int desktop_minimized_count;
|
||||
} DWNState;
|
||||
|
||||
extern DWNState *dwn;
|
||||
|
||||
@@ -86,6 +86,9 @@ void key_snap_right(void);
|
||||
void key_snap_up(void);
|
||||
void key_snap_down(void);
|
||||
void key_start_demo(void);
|
||||
void key_show_desktop(void);
|
||||
void key_move_to_workspace_prev(void);
|
||||
void key_move_to_workspace_next(void);
|
||||
|
||||
void tutorial_start(void);
|
||||
void tutorial_stop(void);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "dwn.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
#define MAX_WIFI_NETWORKS 20
|
||||
#define MAX_TRAY_ICONS 32
|
||||
#define TRAY_ICON_SIZE 22
|
||||
#define TRAY_ICON_SPACING 4
|
||||
@@ -41,21 +40,11 @@ extern TrayIcon tray_icons[MAX_TRAY_ICONS];
|
||||
extern int tray_icon_count;
|
||||
extern Window tray_selection_owner;
|
||||
|
||||
typedef struct {
|
||||
char ssid[64];
|
||||
int signal;
|
||||
char security[32];
|
||||
bool connected;
|
||||
} WifiNetwork;
|
||||
|
||||
typedef struct {
|
||||
bool enabled;
|
||||
bool connected;
|
||||
char current_ssid[64];
|
||||
int signal_strength;
|
||||
WifiNetwork networks[MAX_WIFI_NETWORKS];
|
||||
int network_count;
|
||||
long last_scan;
|
||||
} WifiState;
|
||||
|
||||
typedef struct {
|
||||
@@ -78,29 +67,15 @@ typedef struct {
|
||||
bool dragging;
|
||||
} VolumeSlider;
|
||||
|
||||
typedef struct {
|
||||
Window window;
|
||||
int x, y;
|
||||
int width, height;
|
||||
int item_count;
|
||||
int hovered_item;
|
||||
bool visible;
|
||||
void (*on_select)(int index);
|
||||
} DropdownMenu;
|
||||
|
||||
extern WifiState wifi_state;
|
||||
extern AudioState audio_state;
|
||||
extern BatteryState battery_state;
|
||||
extern DropdownMenu *wifi_menu;
|
||||
extern VolumeSlider *volume_slider;
|
||||
|
||||
void systray_init(void);
|
||||
void systray_cleanup(void);
|
||||
|
||||
void wifi_update_state(void);
|
||||
void wifi_scan_networks(void);
|
||||
void wifi_connect(const char *ssid);
|
||||
void wifi_disconnect(void);
|
||||
const char *wifi_get_icon(void);
|
||||
|
||||
void audio_update_state(void);
|
||||
@@ -120,16 +95,6 @@ void volume_slider_handle_click(VolumeSlider *slider, int x, int y);
|
||||
void volume_slider_handle_motion(VolumeSlider *slider, int x, int y);
|
||||
void volume_slider_handle_release(VolumeSlider *slider);
|
||||
|
||||
DropdownMenu *dropdown_create(int x, int y, int width);
|
||||
void dropdown_destroy(DropdownMenu *menu);
|
||||
void dropdown_show(DropdownMenu *menu);
|
||||
void dropdown_hide(DropdownMenu *menu);
|
||||
void dropdown_add_item(DropdownMenu *menu, const char *label);
|
||||
void dropdown_render(DropdownMenu *menu);
|
||||
int dropdown_hit_test(DropdownMenu *menu, int x, int y);
|
||||
void dropdown_handle_click(DropdownMenu *menu, int x, int y);
|
||||
void dropdown_handle_motion(DropdownMenu *menu, int x, int y);
|
||||
|
||||
void systray_render(Panel *panel, int x, int *width);
|
||||
int systray_get_width(void);
|
||||
void systray_handle_click(int x, int y, int button);
|
||||
|
||||
Reference in New Issue
Block a user