marco 1.29.1
Window manager
Loading...
Searching...
No Matches
workspace.c File Reference
View source
#include <config.h>
#include "workspace.h"
#include "errors.h"
#include "prefs.h"
#include "screen-private.h"
#include <X11/Xatom.h>
#include <string.h>
#include <canberra-gtk.h>
Include dependency graph for workspace.c:

Macros

#define MIN_SANE_AREA   100
 

Functions

void meta_workspace_queue_calc_showing (MetaWorkspace *workspace)
 
static void set_active_space_hint (MetaScreen *screen)
 
static void focus_ancestor_or_top_window (MetaWorkspace *workspace, MetaWindow *not_this_one, guint32 timestamp)
 
static void free_this (gpointer candidate, gpointer dummy)
 Foreach function for workspace_free_struts()
 
static void workspace_free_struts (MetaWorkspace *workspace)
 Frees the struts list of a workspace.
 
static void maybe_add_to_list (MetaScreen *screen, MetaWindow *window, gpointer data)
 
MetaWorkspace * meta_workspace_new (MetaScreen *screen)
 
void meta_workspace_free (MetaWorkspace *workspace)
 
void meta_workspace_add_window (MetaWorkspace *workspace, MetaWindow *window)
 
void meta_workspace_remove_window (MetaWorkspace *workspace, MetaWindow *window)
 
void meta_workspace_relocate_windows (MetaWorkspace *workspace, MetaWorkspace *new_home)
 
static void workspace_switch_sound (MetaWorkspace *from, MetaWorkspace *to)
 
void meta_workspace_activate_with_focus (MetaWorkspace *workspace, MetaWindow *focus_this, guint32 timestamp)
 
void meta_workspace_activate (MetaWorkspace *workspace, guint32 timestamp)
 
int meta_workspace_index (MetaWorkspace *workspace)
 
GList * meta_workspace_list_windows (MetaWorkspace *workspace)
 
void meta_workspace_invalidate_work_area (MetaWorkspace *workspace)
 
static void ensure_work_areas_validated (MetaWorkspace *workspace)
 
void meta_workspace_get_work_area_for_xinerama (MetaWorkspace *workspace, int which_xinerama, MetaRectangle *area)
 
void meta_workspace_get_work_area_all_xineramas (MetaWorkspace *workspace, MetaRectangle *area)
 
GList * meta_workspace_get_onscreen_region (MetaWorkspace *workspace)
 
GList * meta_workspace_get_onxinerama_region (MetaWorkspace *workspace, int which_xinerama)
 
MetaWorkspace * meta_workspace_get_neighbor (MetaWorkspace *workspace, MetaMotionDirection direction)
 
const char * meta_workspace_get_name (MetaWorkspace *workspace)
 
void meta_workspace_focus_default_window (MetaWorkspace *workspace, MetaWindow *not_this_one, guint32 timestamp)
 
static gboolean record_ancestor (MetaWindow *window, void *data)
 

Macro Definition Documentation

◆ MIN_SANE_AREA

#define MIN_SANE_AREA   100

Function Documentation

◆ ensure_work_areas_validated()

◆ focus_ancestor_or_top_window()

static void focus_ancestor_or_top_window ( MetaWorkspace *  workspace,
MetaWindow *  not_this_one,
guint32  timestamp 
)
static

◆ free_this()

static void free_this ( gpointer  candidate,
gpointer  dummy 
)
static

Foreach function for workspace_free_struts()

Referenced by workspace_free_struts().

◆ maybe_add_to_list()

static void maybe_add_to_list ( MetaScreen *  screen,
MetaWindow *  window,
gpointer  data 
)
static

◆ meta_workspace_activate()

void meta_workspace_activate ( MetaWorkspace *  workspace,
guint32  timestamp 
)

References meta_workspace_activate_with_focus(), and NULL.

Referenced by event_callback(), handle_switch_to_workspace(), handle_workspace_switch_or_move(), menu_callback(), meta_screen_new(), process_workspace_switch_grab(), and safely_remove_workspaces().

Here is the call graph for this function:

◆ meta_workspace_activate_with_focus()

◆ meta_workspace_add_window()

◆ meta_workspace_focus_default_window()

◆ meta_workspace_free()

◆ meta_workspace_get_name()

const char * meta_workspace_get_name ( MetaWorkspace *  workspace)

References meta_prefs_get_workspace_name(), and meta_workspace_index().

Referenced by meta_core_get_workspace_name_with_index(), and meta_screen_ensure_workspace_popup().

Here is the call graph for this function:

◆ meta_workspace_get_neighbor()

◆ meta_workspace_get_onscreen_region()

GList * meta_workspace_get_onscreen_region ( MetaWorkspace *  workspace)

References ensure_work_areas_validated(), and _MetaWorkspace::screen_region.

Referenced by setup_constraint_info().

Here is the call graph for this function:

◆ meta_workspace_get_onxinerama_region()

GList * meta_workspace_get_onxinerama_region ( MetaWorkspace *  workspace,
int  which_xinerama 
)

References ensure_work_areas_validated(), and _MetaWorkspace::xinerama_region.

Referenced by place_window_if_needed(), and setup_constraint_info().

Here is the call graph for this function:

◆ meta_workspace_get_work_area_all_xineramas()

void meta_workspace_get_work_area_all_xineramas ( MetaWorkspace *  workspace,
MetaRectangle *  area 
)

References ensure_work_areas_validated(), and _MetaWorkspace::work_area_screen.

Referenced by meta_window_get_work_area_all_xineramas(), and set_work_area_hint().

Here is the call graph for this function:

◆ meta_workspace_get_work_area_for_xinerama()

void meta_workspace_get_work_area_for_xinerama ( MetaWorkspace *  workspace,
int  which_xinerama,
MetaRectangle *  area 
)

References ensure_work_areas_validated(), screen, and _MetaWorkspace::work_area_xinerama.

Referenced by get_work_area_xinerama(), and set_workspace_work_area_hint().

Here is the call graph for this function:

◆ meta_workspace_index()

◆ meta_workspace_invalidate_work_area()

◆ meta_workspace_list_windows()

GList * meta_workspace_list_windows ( MetaWorkspace *  workspace)

References _MetaScreen::display, meta_display_list_windows(), meta_window_located_on_workspace(), NULL, and _MetaWorkspace::screen.

Referenced by ensure_work_areas_validated(), meta_workspace_invalidate_work_area(), and window_would_be_covered().

Here is the call graph for this function:

◆ meta_workspace_new()

◆ meta_workspace_queue_calc_showing()

void meta_workspace_queue_calc_showing ( MetaWorkspace *  workspace)

References META_QUEUE_CALC_SHOWING, meta_window_queue(), NULL, and _MetaWorkspace::windows.

Referenced by meta_workspace_activate_with_focus().

Here is the call graph for this function:

◆ meta_workspace_relocate_windows()

void meta_workspace_relocate_windows ( MetaWorkspace *  workspace,
MetaWorkspace *  new_home 
)

References meta_workspace_add_window(), meta_workspace_remove_window(), NULL, and _MetaWorkspace::windows.

Referenced by dynamic_workspaces_idle_callback(), and safely_remove_workspaces().

Here is the call graph for this function:

◆ meta_workspace_remove_window()

◆ record_ancestor()

static gboolean record_ancestor ( MetaWindow *  window,
void *  data 
)
static

References FALSE.

Referenced by focus_ancestor_or_top_window().

◆ set_active_space_hint()

static void set_active_space_hint ( MetaScreen *  screen)
static

References FALSE, meta_error_trap_pop(), meta_error_trap_push(), meta_workspace_index(), and screen.

Referenced by meta_workspace_activate_with_focus().

Here is the call graph for this function:

◆ workspace_free_struts()

static void workspace_free_struts ( MetaWorkspace *  workspace)
static

Frees the struts list of a workspace.

Parameters
workspaceThe workspace.

References _MetaWorkspace::all_struts, free_this(), and NULL.

Referenced by meta_workspace_free(), and meta_workspace_invalidate_work_area().

Here is the call graph for this function:

◆ workspace_switch_sound()

static void workspace_switch_sound ( MetaWorkspace *  from,
MetaWorkspace *  to 
)
static