Define void functions with (void), not ().
Add missing includes.
Some functions were declared static but defined non-static.
Some variables that should be file static were file global but not used in any other file.
prop.h defined a new prop_atoms in each file that included it instead of declaring it extern.
}
}
-ObActionsAct* actions_build_act_from_string(const gchar *name)
+static ObActionsAct* actions_build_act_from_string(const gchar *name)
{
GSList *it;
ObActionsDefinition *def = NULL;
#include "xerror.h"
#include "screen.h"
#include "moveresize.h"
+#include "ping.h"
#include "place.h"
#include "prop.h"
#include "extensions.h"
static void client_get_shaped(ObClient *self);
static void client_get_mwm_hints(ObClient *self);
static void client_get_colormap(ObClient *self);
+static void client_set_desktop_recursive(ObClient *self,
+ guint target,
+ gboolean donthide,
+ gboolean dontraise);
static void client_change_allowed_actions(ObClient *self);
static void client_change_state(ObClient *self);
static void client_change_wm_state(ObClient *self);
}
#endif
-void client_get_colormap(ObClient *self)
+static void client_get_colormap(ObClient *self)
{
XWindowAttributes wa;
}
}
-void client_set_desktop_recursive(ObClient *self,
- guint target,
- gboolean donthide,
- gboolean dontraise)
+static void client_set_desktop_recursive(ObClient *self,
+ guint target,
+ gboolean donthide,
+ gboolean dontraise)
{
guint old;
GSList *it;
#define MENU_NAME "client-list-combined-menu"
-ObMenu *combined_menu;
+static ObMenu *combined_menu;
#define SEPARATOR -1
#define ADD_DESKTOP -2
#include "stacking.h"
#include "extensions.h"
#include "translate.h"
+#include "ping.h"
#include <X11/Xlib.h>
#include <X11/Xatom.h>
Time event_curtime = CurrentTime;
Time event_last_user_time = CurrentTime;
/*! The serial of the current X event */
-gulong event_curserial;
+static gulong event_curserial;
static gboolean focus_left_screen = FALSE;
/*! A list of ObSerialRanges which are to be ignored for mouse enter events */
static GSList *ignore_serials = NULL;
client, FALSE);
}
-void event_halt_focus_delay()
+void event_halt_focus_delay(void)
{
/* ignore all enter events up till the event which caused this to occur */
if (event_curserial) event_ignore_enter_range(1, event_curserial);
*/
#include "focus_cycle.h"
+#include "focus_cycle_indicator.h"
#include "client.h"
#include "openbox.h"
#include "frame.h"
#define FOCUS_INDICATOR_WIDTH 6
-struct
+static struct
{
InternalWindow top;
InternalWindow left;
}
}
-void keyboard_rebind()
+void keyboard_rebind(void)
{
tree_rebind(keyboard_firstnode);
grab_keys(TRUE);
static GSList *all_loops;
/* signals are global to all loops */
-struct {
+static struct {
guint installed; /* a ref count */
struct sigaction oldact;
} all_signals[NUM_SIGNALS];
/* a set of all possible signals */
-sigset_t all_signals_set;
+static sigset_t all_signals_set;
/* signals which cause a core dump, these can't be used for callbacks */
static gint core_signals[] =
#include "client.h"
#include "prop.h"
#include "event.h"
+#include "debug.h"
#include "mainloop.h"
#include "openbox.h"
Atom ob_theme;
Atom ob_control;
} Atoms;
-Atoms prop_atoms;
+extern Atoms prop_atoms;
void prop_startup();
#include "screen.h"
#include "dock.h"
#include "config.h"
+#include "resist.h"
#include "parser/parse.h"
#include <glib.h>
guint screen_num_monitors;
guint screen_desktop;
guint screen_last_desktop = 1;
-guint screen_old_desktop;
-gboolean screen_desktop_timeout = TRUE;
-Size screen_physical_size;
gboolean screen_showing_desktop;
ObDesktopLayout screen_desktop_layout;
gchar **screen_desktop_names;
Window screen_support_win;
Time screen_desktop_user_time = CurrentTime;
+static Size screen_physical_size;
+static guint screen_old_desktop;
+static gboolean screen_desktop_timeout = TRUE;
/*! An array of desktops, holding array of areas per monitor */
static Rect *monitor_area = NULL;
/*! An array of desktops, holding an array of struts */
/*! When true, stacking changes will not be reflected on the screen. This is
to freeze the on-screen stacking order while a window is being temporarily
raised during focus cycling */
-gboolean pause_changes = FALSE;
+static gboolean pause_changes = FALSE;
void stacking_set_list(void)
{
pause_changes = TRUE;
}
-void stacking_restore()
+void stacking_restore(void)
{
Window *win;
GList *it;
#include "openbox.h"
#include "mouse.h"
#include "modkeys.h"
+#include "translate.h"
#include "gettext.h"
#include <glib.h>
#include <string.h>
#include "openbox.h"
#include "gettext.h"
#include "debug.h"
+#include "xerror.h"
#include <glib.h>
#include <X11/Xlib.h>
return definst;
}
-void RrTrueColorSetup (RrInstance *inst)
+static void RrTrueColorSetup (RrInstance *inst)
{
gulong red_mask, green_mask, blue_mask;
XImage *timage = NULL;
#define RrPseudoNcolors(inst) (1 << (inst->pseudo_bpc * 3))
-void RrPseudoColorSetup (RrInstance *inst)
+static void RrPseudoColorSetup (RrInstance *inst)
{
XColor icolors[256];
gint tr, tg, tb, n, r, g, b, i, incolors, ii;