marco 1.29.1
Window manager
Loading...
Searching...
No Matches
prefs.c File Reference
View source
#include <config.h>
#include <glib/gi18n-lib.h>
#include "prefs.h"
#include "ui.h"
#include "util.h"
#include <gdk/gdk.h>
#include <gio/gio.h>
#include <string.h>
#include <stdlib.h>
#include "all-keybindings.h"
Include dependency graph for prefs.c:

Data Structures

struct  MetaPrefsListener
 
struct  MetaEnumPreference
 The details of one preference which is constrained to be one of a small number of string values– in other words, an enumeration. More...
 
struct  MetaBoolPreference
 
struct  MetaStringPreference
 
struct  MetaIntPreference
 

Macros

#define MAX_REASONABLE_WORKSPACES   36
 
#define KEY_GENERAL_SCHEMA   "org.mate.Marco.general"
 
#define KEY_GENERAL_TITLEBAR_FONT   "titlebar-font"
 
#define KEY_GENERAL_NUM_WORKSPACES   "num-workspaces"
 
#define KEY_GENERAL_COMPOSITOR   "compositing-manager"
 
#define KEY_GENERAL_COMPOSITOR_FAST_ALT_TAB   "compositing-fast-alt-tab"
 
#define KEY_GENERAL_CENTER_NEW_WINDOWS   "center-new-windows"
 
#define KEY_GENERAL_ICON_SIZE   "icon-size"
 
#define KEY_GENERAL_ALT_TAB_MAX_COLUMNS   "alt-tab-max-columns"
 
#define KEY_GENERAL_ALT_TAB_RAISE_WINDOWS   "alt-tab-raise-windows"
 
#define KEY_GENERAL_ALT_TAB_EXPAND_TO_FIT_TITLE   "alt-tab-expand-to-fit-title"
 
#define KEY_COMMAND_SCHEMA   "org.mate.Marco.keybinding-commands"
 
#define KEY_COMMAND_PREFIX   "command-"
 
#define KEY_SCREEN_BINDINGS_SCHEMA   "org.mate.Marco.global-keybindings"
 
#define KEY_WINDOW_BINDINGS_SCHEMA   "org.mate.Marco.window-keybindings"
 
#define KEY_WORKSPACE_NAME_SCHEMA   "org.mate.Marco.workspace-names"
 
#define KEY_WORKSPACE_NAME_PREFIX   "name-"
 
#define KEY_MATE_INTERFACE_SCHEMA   "org.mate.interface"
 
#define KEY_MATE_INTERFACE_ACCESSIBILITY   "accessibility"
 
#define KEY_MATE_INTERFACE_ENABLE_ANIMATIONS   "enable-animations"
 
#define KEY_MATE_TERMINAL_SCHEMA   "org.mate.applications-terminal"
 
#define KEY_MATE_TERMINAL_COMMAND   "exec"
 
#define KEY_MATE_MOUSE_SCHEMA   "org.mate.peripherals-mouse"
 
#define KEY_MATE_MOUSE_CURSOR_THEME   "cursor-theme"
 
#define KEY_MATE_MOUSE_CURSOR_SIZE   "cursor-size"
 
#define SETTINGS(s)   g_hash_table_lookup (settings_schemas, (s))
 
#define METAINTPREFERENCE_NO_CHANGE_ON_DESTROY   G_MININT
 
#define MAX_REASONABLE_AUTO_RAISE_DELAY   10000
 
#define keybind(name, handler, param, flags)    { #name, NULL, !!(flags & BINDING_REVERSES), !!(flags & BINDING_PER_WINDOW) },
 

Functions

static gboolean handle_preference_update_enum (const gchar *key, GSettings *settings)
 
static gboolean update_key_binding (const char *name, gchar *value)
 
static gboolean update_command (const char *name, const char *value)
 
static gboolean update_workspace_name (const char *name, const char *value)
 
static void change_notify (GSettings *settings, gchar *key, gpointer user_data)
 
static char * settings_key_for_workspace_name (int i)
 
static void queue_changed (MetaPreference pref)
 
static void maybe_give_disable_workarounds_warning (void)
 Special case: give a warning the first time disable_workarounds is turned on.
 
static void titlebar_handler (MetaPreference, const gchar *, gboolean *)
 
static void theme_name_handler (MetaPreference, const gchar *, gboolean *)
 
static void mouse_button_mods_handler (MetaPreference, const gchar *, gboolean *)
 
static void button_layout_handler (MetaPreference, const gchar *, gboolean *)
 
static void show_desktop_skip_list_handler (MetaPreference, const gchar *, gboolean *)
 
static gboolean update_binding (MetaKeyPref *binding, gchar *value)
 
static void init_bindings (GSettings *)
 
static void init_screen_bindings (void)
 
static void init_window_bindings (void)
 
static void init_commands (void)
 
static void init_workspace_names (void)
 
static void handle_preference_init_enum (void)
 
static void handle_preference_init_bool (void)
 
static void handle_preference_init_string (void)
 
static void handle_preference_init_int (void)
 
static gboolean handle_preference_update_bool (const gchar *key, GSettings *settings)
 
static gboolean handle_preference_update_string (const gchar *key, GSettings *settings)
 
static gboolean handle_preference_update_int (const gchar *key, GSettings *settings)
 
void meta_prefs_add_listener (MetaPrefsChangedFunc func, gpointer data)
 
void meta_prefs_remove_listener (MetaPrefsChangedFunc func, gpointer data)
 
static void emit_changed (MetaPreference pref)
 
static gboolean changed_idle_handler (gpointer data)
 
void meta_prefs_init (void)
 
MetaVirtualModifier meta_prefs_get_mouse_button_mods (void)
 
MetaFocusMode meta_prefs_get_focus_mode (void)
 
MetaFocusNewWindows meta_prefs_get_focus_new_windows (void)
 
gboolean meta_prefs_get_attach_modal_dialogs (void)
 
gboolean meta_prefs_get_raise_on_click (void)
 
const char * meta_prefs_get_theme (void)
 
const char * meta_prefs_get_cursor_theme (void)
 
int meta_prefs_get_cursor_size (void)
 
int meta_prefs_get_icon_size (void)
 
int meta_prefs_get_alt_tab_max_columns (void)
 
gboolean meta_prefs_get_alt_tab_expand_to_fit_title (void)
 
gboolean meta_prefs_get_alt_tab_raise_windows (void)
 
MetaMinimizedWindowPlacement meta_prefs_get_alt_tab_minimized_placement (void)
 
MetaUrgentWindowPlacement meta_prefs_get_alt_tab_urgent_placement (void)
 
gboolean meta_prefs_is_in_skip_list (char *class)
 
static gboolean button_layout_equal (const MetaButtonLayout *a, const MetaButtonLayout *b)
 
static MetaButtonFunction button_function_from_string (const char *str)
 
static MetaButtonFunction button_opposite_function (MetaButtonFunction ofwhat)
 
const PangoFontDescription * meta_prefs_get_titlebar_font (void)
 
int meta_prefs_get_num_workspaces (void)
 
gboolean meta_prefs_get_dynamic_workspaces (void)
 
MetaWrapStyle meta_prefs_get_wrap_style (void)
 
gboolean meta_prefs_get_application_based (void)
 
gboolean meta_prefs_get_disable_workarounds (void)
 
void meta_prefs_set_num_workspaces (int n_workspaces)
 
static const gchar * relative_key (const gchar *key)
 
static gboolean find_and_update_binding (MetaKeyPref *bindings, const char *name, gchar *value)
 
const char * meta_prefs_get_command (int i)
 
char * meta_prefs_get_settings_key_for_command (int i)
 
const char * meta_prefs_get_terminal_command (void)
 
const char * meta_prefs_get_settings_key_for_terminal_command (void)
 
const char * meta_prefs_get_workspace_name (int i)
 
void meta_prefs_change_workspace_name (int i, const char *name)
 
void meta_prefs_get_button_layout (MetaButtonLayout *button_layout_p)
 
gboolean meta_prefs_get_visual_bell (void)
 
gboolean meta_prefs_bell_is_audible (void)
 
MetaVisualBellType meta_prefs_get_visual_bell_type (void)
 
void meta_prefs_get_key_bindings (const MetaKeyPref **bindings, int *n_bindings)
 
MetaActionTitlebar meta_prefs_get_action_double_click_titlebar (void)
 
MetaActionTitlebar meta_prefs_get_action_middle_click_titlebar (void)
 
MetaActionTitlebar meta_prefs_get_action_right_click_titlebar (void)
 
MetaActionTitlebar meta_prefs_get_action_scroll_up_titlebar (void)
 
MetaActionTitlebar meta_prefs_get_action_scroll_down_titlebar (void)
 
gboolean meta_prefs_get_auto_raise (void)
 
int meta_prefs_get_auto_raise_delay (void)
 
gboolean meta_prefs_get_reduced_resources (void)
 
gboolean meta_prefs_get_mate_accessibility ()
 
gboolean meta_prefs_get_mate_animations ()
 
MetaKeyBindingAction meta_prefs_get_keybinding_action (const char *name)
 
void meta_prefs_get_window_binding (const char *name, unsigned int *keysym, MetaVirtualModifier *modifiers)
 
gboolean meta_prefs_get_compositing_manager (void)
 
gboolean meta_prefs_get_compositing_fast_alt_tab (void)
 
gboolean meta_prefs_get_center_new_windows (void)
 
gboolean meta_prefs_get_allow_tiling ()
 
gboolean meta_prefs_get_allow_top_tiling ()
 
gboolean meta_prefs_get_allow_tile_cycling ()
 
guint meta_prefs_get_mouse_button_resize (void)
 
guint meta_prefs_get_mouse_button_menu (void)
 
gboolean meta_prefs_show_tab_border (void)
 
gboolean meta_prefs_get_force_fullscreen (void)
 
MetaPlacementMode meta_prefs_get_placement_mode (void)
 
void meta_prefs_set_force_compositing_manager (gboolean whether)
 Sets whether the compositor is turned on.
 
void meta_prefs_set_compositing_fast_alt_tab (gboolean whether)
 
void meta_prefs_set_center_new_windows (gboolean whether)
 
void meta_prefs_set_force_fullscreen (gboolean whether)
 

Variables

static GSettings * settings_general
 
static GSettings * settings_command
 
static GSettings * settings_screen_bindings
 
static GSettings * settings_window_bindings
 
static GSettings * settings_workspace_names
 
static GSettings * settings_mate_interface
 
static GSettings * settings_mate_terminal
 
static GSettings * settings_mate_mouse
 
static GHashTable * settings_schemas
 
static GList * changes = NULL
 
static guint changed_idle
 
static GList * listeners = NULL
 
static gboolean use_system_font = FALSE
 
static PangoFontDescription * titlebar_font = NULL
 
static MetaVirtualModifier mouse_button_mods = Mod1Mask
 
static MetaFocusMode focus_mode = META_FOCUS_MODE_CLICK
 
static MetaFocusNewWindows focus_new_windows = META_FOCUS_NEW_WINDOWS_SMART
 
static gboolean raise_on_click = TRUE
 
static gboolean attach_modal_dialogs = FALSE
 
static char * current_theme = NULL
 
static int num_workspaces = 4
 
static gboolean dynamic_workspaces = FALSE
 
static MetaWrapStyle wrap_style = META_WRAP_NONE
 
static MetaActionTitlebar action_double_click_titlebar = META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE
 
static MetaActionTitlebar action_middle_click_titlebar = META_ACTION_TITLEBAR_LOWER
 
static MetaActionTitlebar action_right_click_titlebar = META_ACTION_TITLEBAR_MENU
 
static MetaActionTitlebar action_scroll_up_titlebar = META_ACTION_TITLEBAR_NONE
 
static MetaActionTitlebar action_scroll_down_titlebar = META_ACTION_TITLEBAR_NONE
 
static gboolean application_based = FALSE
 
static gboolean disable_workarounds = FALSE
 
static gboolean auto_raise = FALSE
 
static gboolean auto_raise_delay = 500
 
static gboolean provide_visual_bell = FALSE
 
static gboolean bell_is_audible = TRUE
 
static gboolean reduced_resources = FALSE
 
static gboolean mate_accessibility = FALSE
 
static gboolean mate_animations = TRUE
 
static char * cursor_theme = NULL
 
static int cursor_size = 24
 
static int icon_size = META_DEFAULT_ICON_SIZE
 
static int alt_tab_max_columns = META_DEFAULT_ALT_TAB_MAX_COLUMNS
 
static gboolean alt_tab_raise_windows = META_DEFAULT_ALT_TAB_RAISE_WINDOWS
 
static gboolean alt_tab_expand_to_fit_title = META_DEFAULT_ALT_TAB_EXPAND_TO_FIT_TITLE
 
static MetaMinimizedWindowPlacement alt_tab_minimized_placement = META_DEFAULT_ALT_TAB_MINIMIZED_PLACEMENT
 
static MetaUrgentWindowPlacement alt_tab_urgent_placement = META_DEFAULT_ALT_TAB_URGENT_PLACEMENT
 
static gboolean use_force_compositor_manager = FALSE
 
static gboolean force_compositor_manager = FALSE
 
static gboolean compositing_manager = FALSE
 
static gboolean compositing_fast_alt_tab = FALSE
 
static gboolean resize_with_right_button = FALSE
 
static gboolean show_tab_border = FALSE
 
static gboolean center_new_windows = FALSE
 
static gboolean force_fullscreen = TRUE
 
static gboolean allow_tiling = FALSE
 
static gboolean allow_top_tiling = TRUE
 
static gboolean allow_tile_cycling = TRUE
 
static GList * show_desktop_skip_list = NULL
 
static MetaVisualBellType visual_bell_type = META_VISUAL_BELL_FULLSCREEN_FLASH
 
static MetaButtonLayout button_layout
 
static char * commands [MAX_COMMANDS] = { NULL, }
 
static char * terminal_command = NULL
 
static char * workspace_names [MAX_REASONABLE_WORKSPACES] = { NULL, }
 
static MetaPlacementMode placement_mode = META_PLACEMENT_MODE_AUTOMATIC
 
static MetaEnumPreference preferences_enum []
 
static MetaBoolPreference preferences_bool []
 
static MetaStringPreference preferences_string []
 
static MetaIntPreference preferences_int []
 
gboolean(* preference_update_handler [])(const gchar *, GSettings *)
 
static MetaKeyPref key_bindings []
 

Macro Definition Documentation

◆ KEY_COMMAND_PREFIX

#define KEY_COMMAND_PREFIX   "command-"

◆ KEY_COMMAND_SCHEMA

#define KEY_COMMAND_SCHEMA   "org.mate.Marco.keybinding-commands"

◆ KEY_GENERAL_ALT_TAB_EXPAND_TO_FIT_TITLE

#define KEY_GENERAL_ALT_TAB_EXPAND_TO_FIT_TITLE   "alt-tab-expand-to-fit-title"

◆ KEY_GENERAL_ALT_TAB_MAX_COLUMNS

#define KEY_GENERAL_ALT_TAB_MAX_COLUMNS   "alt-tab-max-columns"

◆ KEY_GENERAL_ALT_TAB_RAISE_WINDOWS

#define KEY_GENERAL_ALT_TAB_RAISE_WINDOWS   "alt-tab-raise-windows"

◆ KEY_GENERAL_CENTER_NEW_WINDOWS

#define KEY_GENERAL_CENTER_NEW_WINDOWS   "center-new-windows"

◆ KEY_GENERAL_COMPOSITOR

#define KEY_GENERAL_COMPOSITOR   "compositing-manager"

◆ KEY_GENERAL_COMPOSITOR_FAST_ALT_TAB

#define KEY_GENERAL_COMPOSITOR_FAST_ALT_TAB   "compositing-fast-alt-tab"

◆ KEY_GENERAL_ICON_SIZE

#define KEY_GENERAL_ICON_SIZE   "icon-size"

◆ KEY_GENERAL_NUM_WORKSPACES

#define KEY_GENERAL_NUM_WORKSPACES   "num-workspaces"

◆ KEY_GENERAL_SCHEMA

#define KEY_GENERAL_SCHEMA   "org.mate.Marco.general"

◆ KEY_GENERAL_TITLEBAR_FONT

#define KEY_GENERAL_TITLEBAR_FONT   "titlebar-font"

◆ KEY_MATE_INTERFACE_ACCESSIBILITY

#define KEY_MATE_INTERFACE_ACCESSIBILITY   "accessibility"

◆ KEY_MATE_INTERFACE_ENABLE_ANIMATIONS

#define KEY_MATE_INTERFACE_ENABLE_ANIMATIONS   "enable-animations"

◆ KEY_MATE_INTERFACE_SCHEMA

#define KEY_MATE_INTERFACE_SCHEMA   "org.mate.interface"

◆ KEY_MATE_MOUSE_CURSOR_SIZE

#define KEY_MATE_MOUSE_CURSOR_SIZE   "cursor-size"

◆ KEY_MATE_MOUSE_CURSOR_THEME

#define KEY_MATE_MOUSE_CURSOR_THEME   "cursor-theme"

◆ KEY_MATE_MOUSE_SCHEMA

#define KEY_MATE_MOUSE_SCHEMA   "org.mate.peripherals-mouse"

◆ KEY_MATE_TERMINAL_COMMAND

#define KEY_MATE_TERMINAL_COMMAND   "exec"

◆ KEY_MATE_TERMINAL_SCHEMA

#define KEY_MATE_TERMINAL_SCHEMA   "org.mate.applications-terminal"

◆ KEY_SCREEN_BINDINGS_SCHEMA

#define KEY_SCREEN_BINDINGS_SCHEMA   "org.mate.Marco.global-keybindings"

◆ KEY_WINDOW_BINDINGS_SCHEMA

#define KEY_WINDOW_BINDINGS_SCHEMA   "org.mate.Marco.window-keybindings"

◆ KEY_WORKSPACE_NAME_PREFIX

#define KEY_WORKSPACE_NAME_PREFIX   "name-"

◆ KEY_WORKSPACE_NAME_SCHEMA

#define KEY_WORKSPACE_NAME_SCHEMA   "org.mate.Marco.workspace-names"

◆ keybind

#define keybind (   name,
  handler,
  param,
  flags 
)     { #name, NULL, !!(flags & BINDING_REVERSES), !!(flags & BINDING_PER_WINDOW) },

◆ MAX_REASONABLE_AUTO_RAISE_DELAY

#define MAX_REASONABLE_AUTO_RAISE_DELAY   10000

◆ MAX_REASONABLE_WORKSPACES

#define MAX_REASONABLE_WORKSPACES   36

◆ METAINTPREFERENCE_NO_CHANGE_ON_DESTROY

#define METAINTPREFERENCE_NO_CHANGE_ON_DESTROY   G_MININT

◆ SETTINGS

#define SETTINGS (   s)    g_hash_table_lookup (settings_schemas, (s))

Function Documentation

◆ button_function_from_string()

◆ button_layout_equal()

◆ button_layout_handler()

static void button_layout_handler ( MetaPreference  pref,
const gchar *  string_value,
gboolean *  inform_listeners 
)
static

◆ button_opposite_function()

◆ change_notify()

static void change_notify ( GSettings *  settings,
gchar *  key,
gpointer  user_data 
)
static

References KEY_COMMAND_SCHEMA, KEY_SCREEN_BINDINGS_SCHEMA, KEY_WINDOW_BINDINGS_SCHEMA, KEY_WORKSPACE_NAME_SCHEMA, META_DEBUG_PREFS, META_PREF_COMMANDS, META_PREF_KEYBINDINGS, META_PREF_WORKSPACE_NAMES, NULL, preference_update_handler, queue_changed(), update_command(), update_key_binding(), and update_workspace_name().

Referenced by meta_prefs_init().

Here is the call graph for this function:

◆ changed_idle_handler()

static gboolean changed_idle_handler ( gpointer  data)
static

References changed_idle, changes, emit_changed(), FALSE, and NULL.

Referenced by queue_changed().

Here is the call graph for this function:

◆ emit_changed()

static void emit_changed ( MetaPreference  pref)
static

References MetaPrefsListener::data, MetaPrefsListener::func, listeners, META_DEBUG_PREFS, meta_preference_to_string(), and NULL.

Referenced by changed_idle_handler().

Here is the call graph for this function:

◆ find_and_update_binding()

static gboolean find_and_update_binding ( MetaKeyPref *  bindings,
const char *  name,
gchar *  value 
)
static

References FALSE, relative_key(), and update_binding().

Referenced by update_key_binding().

Here is the call graph for this function:

◆ handle_preference_init_bool()

static void handle_preference_init_bool ( void  )
static

References MetaBoolPreference::key, maybe_give_disable_workarounds_warning(), NULL, preferences_bool, MetaBoolPreference::schema, SETTINGS, and MetaBoolPreference::target.

Referenced by meta_prefs_init().

Here is the call graph for this function:

◆ handle_preference_init_enum()

static void handle_preference_init_enum ( void  )
static

◆ handle_preference_init_int()

static void handle_preference_init_int ( void  )
static

References _, MetaIntPreference::key, MetaIntPreference::maximum, meta_warning(), MetaIntPreference::minimum, NULL, preferences_int, MetaIntPreference::schema, SETTINGS, and MetaIntPreference::target.

Referenced by meta_prefs_init().

Here is the call graph for this function:

◆ handle_preference_init_string()

static void handle_preference_init_string ( void  )
static

References MetaStringPreference::handler, MetaStringPreference::key, meta_bug(), NULL, MetaStringPreference::pref, preferences_string, MetaStringPreference::schema, SETTINGS, MetaStringPreference::target, and TRUE.

Referenced by meta_prefs_init().

Here is the call graph for this function:

◆ handle_preference_update_bool()

static gboolean handle_preference_update_bool ( const gchar *  key,
GSettings *  settings 
)
static

References FALSE, MetaBoolPreference::key, maybe_give_disable_workarounds_warning(), META_PREF_DISABLE_WORKAROUNDS, NULL, MetaBoolPreference::pref, preferences_bool, queue_changed(), MetaBoolPreference::target, and TRUE.

Here is the call graph for this function:

◆ handle_preference_update_enum()

static gboolean handle_preference_update_enum ( const gchar *  key,
GSettings *  settings 
)
static

References FALSE, MetaEnumPreference::key, NULL, MetaEnumPreference::pref, preferences_enum, queue_changed(), MetaEnumPreference::target, and TRUE.

Here is the call graph for this function:

◆ handle_preference_update_int()

static gboolean handle_preference_update_int ( const gchar *  key,
GSettings *  settings 
)
static

References _, FALSE, MetaIntPreference::key, MetaIntPreference::maximum, meta_warning(), MetaIntPreference::minimum, NULL, MetaIntPreference::pref, preferences_int, queue_changed(), MetaIntPreference::target, and TRUE.

Here is the call graph for this function:

◆ handle_preference_update_string()

static gboolean handle_preference_update_string ( const gchar *  key,
GSettings *  settings 
)
static

References FALSE, MetaStringPreference::handler, MetaStringPreference::key, NULL, MetaStringPreference::pref, preferences_string, queue_changed(), MetaStringPreference::target, and TRUE.

Here is the call graph for this function:

◆ init_bindings()

static void init_bindings ( GSettings *  settings)
static

References NULL, and update_key_binding().

Referenced by init_screen_bindings(), and init_window_bindings().

Here is the call graph for this function:

◆ init_commands()

static void init_commands ( void  )
static

References NULL, settings_command, and update_command().

Referenced by meta_prefs_init().

Here is the call graph for this function:

◆ init_screen_bindings()

static void init_screen_bindings ( void  )
static

References init_bindings(), and settings_screen_bindings.

Referenced by meta_prefs_init().

Here is the call graph for this function:

◆ init_window_bindings()

static void init_window_bindings ( void  )
static

References init_bindings(), and settings_window_bindings.

Referenced by meta_prefs_init().

Here is the call graph for this function:

◆ init_workspace_names()

static void init_workspace_names ( void  )
static

References NULL, settings_workspace_names, and update_workspace_name().

Referenced by meta_prefs_init().

Here is the call graph for this function:

◆ maybe_give_disable_workarounds_warning()

static void maybe_give_disable_workarounds_warning ( void  )
static

Special case: give a warning the first time disable_workarounds is turned on.

References _, disable_workarounds, FALSE, meta_warning(), and TRUE.

Referenced by handle_preference_init_bool(), and handle_preference_update_bool().

Here is the call graph for this function:

◆ meta_prefs_add_listener()

◆ meta_prefs_bell_is_audible()

gboolean meta_prefs_bell_is_audible ( void  )

References bell_is_audible.

Referenced by prefs_changed_callback().

◆ meta_prefs_change_workspace_name()

void meta_prefs_change_workspace_name ( int  i,
const char *  name 
)

References MAX_REASONABLE_WORKSPACES, META_DEBUG_PREFS, NULL, settings_key_for_workspace_name(), settings_workspace_names, and workspace_names.

Referenced by handle_rename_workspace_callback(), and meta_screen_update_workspace_names().

Here is the call graph for this function:

◆ meta_prefs_get_action_double_click_titlebar()

MetaActionTitlebar meta_prefs_get_action_double_click_titlebar ( void  )

◆ meta_prefs_get_action_middle_click_titlebar()

MetaActionTitlebar meta_prefs_get_action_middle_click_titlebar ( void  )

◆ meta_prefs_get_action_right_click_titlebar()

MetaActionTitlebar meta_prefs_get_action_right_click_titlebar ( void  )

◆ meta_prefs_get_action_scroll_down_titlebar()

MetaActionTitlebar meta_prefs_get_action_scroll_down_titlebar ( void  )

◆ meta_prefs_get_action_scroll_up_titlebar()

MetaActionTitlebar meta_prefs_get_action_scroll_up_titlebar ( void  )

◆ meta_prefs_get_allow_tile_cycling()

gboolean meta_prefs_get_allow_tile_cycling ( void  )

References allow_tile_cycling.

Referenced by handle_toggle_tiled().

◆ meta_prefs_get_allow_tiling()

gboolean meta_prefs_get_allow_tiling ( void  )

References allow_tiling.

Referenced by update_move().

◆ meta_prefs_get_allow_top_tiling()

gboolean meta_prefs_get_allow_top_tiling ( void  )

References allow_top_tiling.

Referenced by calculate_tiling_mode().

◆ meta_prefs_get_alt_tab_expand_to_fit_title()

gboolean meta_prefs_get_alt_tab_expand_to_fit_title ( void  )

◆ meta_prefs_get_alt_tab_max_columns()

int meta_prefs_get_alt_tab_max_columns ( void  )

◆ meta_prefs_get_alt_tab_minimized_placement()

MetaMinimizedWindowPlacement meta_prefs_get_alt_tab_minimized_placement ( void  )

◆ meta_prefs_get_alt_tab_raise_windows()

gboolean meta_prefs_get_alt_tab_raise_windows ( void  )

References alt_tab_raise_windows.

Referenced by process_tab_grab().

◆ meta_prefs_get_alt_tab_urgent_placement()

MetaUrgentWindowPlacement meta_prefs_get_alt_tab_urgent_placement ( void  )

◆ meta_prefs_get_application_based()

gboolean meta_prefs_get_application_based ( void  )

References application_based, and FALSE.

Referenced by event_callback().

◆ meta_prefs_get_attach_modal_dialogs()

◆ meta_prefs_get_auto_raise()

gboolean meta_prefs_get_auto_raise ( void  )

◆ meta_prefs_get_auto_raise_delay()

int meta_prefs_get_auto_raise_delay ( void  )

◆ meta_prefs_get_button_layout()

void meta_prefs_get_button_layout ( MetaButtonLayout *  button_layout_p)

◆ meta_prefs_get_center_new_windows()

gboolean meta_prefs_get_center_new_windows ( void  )

References center_new_windows.

Referenced by find_first_fit(), and meta_window_place().

◆ meta_prefs_get_command()

const char * meta_prefs_get_command ( int  i)

References commands, MAX_COMMANDS, and NULL.

Referenced by handle_run_command().

◆ meta_prefs_get_compositing_fast_alt_tab()

gboolean meta_prefs_get_compositing_fast_alt_tab ( void  )

◆ meta_prefs_get_compositing_manager()

◆ meta_prefs_get_cursor_size()

int meta_prefs_get_cursor_size ( void  )

◆ meta_prefs_get_cursor_theme()

const char * meta_prefs_get_cursor_theme ( void  )

◆ meta_prefs_get_disable_workarounds()

gboolean meta_prefs_get_disable_workarounds ( void  )

◆ meta_prefs_get_dynamic_workspaces()

gboolean meta_prefs_get_dynamic_workspaces ( void  )

◆ meta_prefs_get_focus_mode()

◆ meta_prefs_get_focus_new_windows()

MetaFocusNewWindows meta_prefs_get_focus_new_windows ( void  )

◆ meta_prefs_get_force_fullscreen()

gboolean meta_prefs_get_force_fullscreen ( void  )

◆ meta_prefs_get_icon_size()

◆ meta_prefs_get_key_bindings()

void meta_prefs_get_key_bindings ( const MetaKeyPref **  bindings,
int *  n_bindings 
)

References key_bindings.

Referenced by rebuild_key_binding_table().

◆ meta_prefs_get_keybinding_action()

MetaKeyBindingAction meta_prefs_get_keybinding_action ( const char *  name)

◆ meta_prefs_get_mate_accessibility()

gboolean meta_prefs_get_mate_accessibility ( void  )

◆ meta_prefs_get_mate_animations()

gboolean meta_prefs_get_mate_animations ( void  )

References mate_animations.

Referenced by run_handler().

◆ meta_prefs_get_mouse_button_menu()

guint meta_prefs_get_mouse_button_menu ( void  )

References resize_with_right_button.

Referenced by event_callback().

◆ meta_prefs_get_mouse_button_mods()

MetaVirtualModifier meta_prefs_get_mouse_button_mods ( void  )

◆ meta_prefs_get_mouse_button_resize()

guint meta_prefs_get_mouse_button_resize ( void  )

References resize_with_right_button.

Referenced by event_callback().

◆ meta_prefs_get_num_workspaces()

int meta_prefs_get_num_workspaces ( void  )

References num_workspaces.

Referenced by update_num_workspaces().

◆ meta_prefs_get_placement_mode()

MetaPlacementMode meta_prefs_get_placement_mode ( void  )

References placement_mode.

Referenced by meta_window_place().

◆ meta_prefs_get_raise_on_click()

◆ meta_prefs_get_reduced_resources()

gboolean meta_prefs_get_reduced_resources ( void  )

◆ meta_prefs_get_settings_key_for_command()

char * meta_prefs_get_settings_key_for_command ( int  i)

◆ meta_prefs_get_settings_key_for_terminal_command()

const char * meta_prefs_get_settings_key_for_terminal_command ( void  )

◆ meta_prefs_get_terminal_command()

const char * meta_prefs_get_terminal_command ( void  )

References terminal_command.

Referenced by handle_run_terminal().

◆ meta_prefs_get_theme()

const char * meta_prefs_get_theme ( void  )

◆ meta_prefs_get_titlebar_font()

const PangoFontDescription * meta_prefs_get_titlebar_font ( void  )

◆ meta_prefs_get_visual_bell()

gboolean meta_prefs_get_visual_bell ( void  )

References provide_visual_bell.

◆ meta_prefs_get_visual_bell_type()

MetaVisualBellType meta_prefs_get_visual_bell_type ( void  )

References visual_bell_type.

◆ meta_prefs_get_window_binding()

void meta_prefs_get_window_binding ( const char *  name,
unsigned int *  keysym,
MetaVirtualModifier *  modifiers 
)

◆ meta_prefs_get_workspace_name()

const char * meta_prefs_get_workspace_name ( int  i)

◆ meta_prefs_get_wrap_style()

MetaWrapStyle meta_prefs_get_wrap_style ( void  )

References wrap_style.

Referenced by meta_workspace_get_neighbor().

◆ meta_prefs_init()

◆ meta_prefs_is_in_skip_list()

gboolean meta_prefs_is_in_skip_list ( char *  class)

◆ meta_prefs_remove_listener()

void meta_prefs_remove_listener ( MetaPrefsChangedFunc  func,
gpointer  data 
)

References MetaPrefsListener::data, MetaPrefsListener::func, listeners, meta_bug(), and NULL.

Referenced by meta_display_close(), meta_display_shutdown_keys(), meta_frames_finalize(), meta_screen_free(), and meta_window_destroy_frame().

Here is the call graph for this function:

◆ meta_prefs_set_center_new_windows()

void meta_prefs_set_center_new_windows ( gboolean  whether)

◆ meta_prefs_set_compositing_fast_alt_tab()

void meta_prefs_set_compositing_fast_alt_tab ( gboolean  whether)

◆ meta_prefs_set_force_compositing_manager()

void meta_prefs_set_force_compositing_manager ( gboolean  whether)

Sets whether the compositor is turned on.

Parameters
whetherTRUE to turn on, FALSE to turn off

References force_compositor_manager, TRUE, and use_force_compositor_manager.

Referenced by main().

◆ meta_prefs_set_force_fullscreen()

void meta_prefs_set_force_fullscreen ( gboolean  whether)

References force_fullscreen.

Referenced by main().

◆ meta_prefs_set_num_workspaces()

void meta_prefs_set_num_workspaces ( int  n_workspaces)

◆ meta_prefs_show_tab_border()

gboolean meta_prefs_show_tab_border ( void  )

References show_tab_border.

Referenced by meta_screen_ensure_tab_popup().

◆ mouse_button_mods_handler()

static void mouse_button_mods_handler ( MetaPreference  pref,
const gchar *  string_value,
gboolean *  inform_listeners 
)
static

References _, FALSE, META_DEBUG_KEYBINDINGS, meta_ui_parse_modifier(), meta_warning(), and mouse_button_mods.

Here is the call graph for this function:

◆ queue_changed()

static void queue_changed ( MetaPreference  pref)
static

References changed_idle, changed_idle_handler(), changes, META_DEBUG_PREFS, meta_preference_to_string(), META_PRIORITY_PREFS_NOTIFY, and NULL.

Referenced by change_notify(), handle_preference_update_bool(), handle_preference_update_enum(), handle_preference_update_int(), and handle_preference_update_string().

Here is the call graph for this function:

◆ relative_key()

static const gchar * relative_key ( const gchar *  key)
static

Referenced by find_and_update_binding().

◆ settings_key_for_workspace_name()

static char * settings_key_for_workspace_name ( int  i)
static

◆ show_desktop_skip_list_handler()

static void show_desktop_skip_list_handler ( MetaPreference  pref,
const gchar *  string_value,
gboolean *  inform_listeners 
)
static

References item, NULL, and show_desktop_skip_list.

◆ theme_name_handler()

static void theme_name_handler ( MetaPreference  pref,
const gchar *  string_value,
gboolean *  inform_listeners 
)
static

References current_theme, and NULL.

◆ titlebar_handler()

static void titlebar_handler ( MetaPreference  pref,
const gchar *  string_value,
gboolean *  inform_listeners 
)
static

References _, FALSE, KEY_GENERAL_TITLEBAR_FONT, meta_warning(), NULL, and titlebar_font.

Here is the call graph for this function:

◆ update_binding()

static gboolean update_binding ( MetaKeyPref *  binding,
gchar *  value 
)
static

References _, MetaKeyPref::add_shift, MetaKeyPref::bindings, FALSE, MetaKeyCombo::keycode, MetaKeyCombo::keysym, META_DEBUG_KEYBINDINGS, meta_ui_accelerator_name(), meta_ui_parse_accelerator(), META_VIRTUAL_SHIFT_MASK, meta_warning(), MetaKeyCombo::modifiers, MetaKeyPref::name, settings_screen_bindings, and TRUE.

Referenced by find_and_update_binding().

Here is the call graph for this function:

◆ update_command()

static gboolean update_command ( const char *  name,
const char *  value 
)
static

◆ update_key_binding()

static gboolean update_key_binding ( const char *  name,
gchar *  value 
)
static

References find_and_update_binding(), and key_bindings.

Referenced by change_notify(), and init_bindings().

Here is the call graph for this function:

◆ update_workspace_name()

static gboolean update_workspace_name ( const char *  name,
const char *  value 
)
static

Variable Documentation

◆ action_double_click_titlebar

◆ action_middle_click_titlebar

◆ action_right_click_titlebar

◆ action_scroll_down_titlebar

◆ action_scroll_up_titlebar

◆ allow_tile_cycling

gboolean allow_tile_cycling = TRUE
static

◆ allow_tiling

gboolean allow_tiling = FALSE
static

◆ allow_top_tiling

gboolean allow_top_tiling = TRUE
static

◆ alt_tab_expand_to_fit_title

gboolean alt_tab_expand_to_fit_title = META_DEFAULT_ALT_TAB_EXPAND_TO_FIT_TITLE
static

◆ alt_tab_max_columns

int alt_tab_max_columns = META_DEFAULT_ALT_TAB_MAX_COLUMNS
static

◆ alt_tab_minimized_placement

◆ alt_tab_raise_windows

gboolean alt_tab_raise_windows = META_DEFAULT_ALT_TAB_RAISE_WINDOWS
static

◆ alt_tab_urgent_placement

◆ application_based

gboolean application_based = FALSE
static

◆ attach_modal_dialogs

gboolean attach_modal_dialogs = FALSE
static

◆ auto_raise

gboolean auto_raise = FALSE
static

◆ auto_raise_delay

gboolean auto_raise_delay = 500
static

◆ bell_is_audible

gboolean bell_is_audible = TRUE
static

◆ button_layout

◆ center_new_windows

gboolean center_new_windows = FALSE
static

◆ changed_idle

guint changed_idle
static

◆ changes

◆ commands

char* commands[MAX_COMMANDS] = { NULL, }
static

◆ compositing_fast_alt_tab

gboolean compositing_fast_alt_tab = FALSE
static

◆ compositing_manager

gboolean compositing_manager = FALSE
static

◆ current_theme

char* current_theme = NULL
static

◆ cursor_size

int cursor_size = 24
static

◆ cursor_theme

char* cursor_theme = NULL
static

◆ disable_workarounds

gboolean disable_workarounds = FALSE
static

◆ dynamic_workspaces

gboolean dynamic_workspaces = FALSE
static

◆ focus_mode

◆ focus_new_windows

◆ force_compositor_manager

gboolean force_compositor_manager = FALSE
static

◆ force_fullscreen

gboolean force_fullscreen = TRUE
static

◆ icon_size

◆ key_bindings

MetaKeyPref key_bindings[]
static
Initial value:
= {
{ NULL, NULL, FALSE }
}
#define NULL
Definition async-getprop.c:44
#define FALSE
Definition testasyncgetprop.c:47

Referenced by meta_prefs_get_key_bindings(), meta_prefs_get_keybinding_action(), meta_prefs_get_window_binding(), and update_key_binding().

◆ listeners

GList* listeners = NULL
static

◆ mate_accessibility

gboolean mate_accessibility = FALSE
static

◆ mate_animations

gboolean mate_animations = TRUE
static

◆ mouse_button_mods

MetaVirtualModifier mouse_button_mods = Mod1Mask
static

◆ num_workspaces

◆ placement_mode

◆ preference_update_handler

gboolean(* preference_update_handler[])(const gchar *, GSettings *) ( const gchar *  ,
GSettings *   
)
Initial value:
= {
}
static gboolean handle_preference_update_int(const gchar *key, GSettings *settings)
Definition prefs.c:808
static gboolean handle_preference_update_bool(const gchar *key, GSettings *settings)
Definition prefs.c:728
static gboolean handle_preference_update_enum(const gchar *key, GSettings *settings)
Definition prefs.c:698
static gboolean handle_preference_update_string(const gchar *key, GSettings *settings)
Definition prefs.c:766

Referenced by change_notify().

◆ preferences_bool

◆ preferences_enum

◆ preferences_int

◆ preferences_string

◆ provide_visual_bell

gboolean provide_visual_bell = FALSE
static

◆ raise_on_click

gboolean raise_on_click = TRUE
static

◆ reduced_resources

gboolean reduced_resources = FALSE
static

◆ resize_with_right_button

gboolean resize_with_right_button = FALSE
static

◆ settings_command

GSettings* settings_command
static

Referenced by init_commands(), and meta_prefs_init().

◆ settings_general

◆ settings_mate_interface

GSettings* settings_mate_interface
static

Referenced by meta_prefs_init().

◆ settings_mate_mouse

GSettings* settings_mate_mouse
static

Referenced by meta_prefs_init().

◆ settings_mate_terminal

GSettings* settings_mate_terminal
static

Referenced by meta_prefs_init().

◆ settings_schemas

GHashTable* settings_schemas
static

Referenced by meta_prefs_init().

◆ settings_screen_bindings

GSettings* settings_screen_bindings
static

◆ settings_window_bindings

GSettings* settings_window_bindings
static

◆ settings_workspace_names

GSettings* settings_workspace_names
static

◆ show_desktop_skip_list

GList* show_desktop_skip_list = NULL
static

◆ show_tab_border

gboolean show_tab_border = FALSE
static

◆ terminal_command

char* terminal_command = NULL
static

◆ titlebar_font

PangoFontDescription* titlebar_font = NULL
static

◆ use_force_compositor_manager

gboolean use_force_compositor_manager = FALSE
static

◆ use_system_font

gboolean use_system_font = FALSE
static

◆ visual_bell_type

◆ workspace_names

◆ wrap_style

MetaWrapStyle wrap_style = META_WRAP_NONE
static