screen.c File Reference

Go to the source code of this file.

Data Structures

struct  WindowInfo
struct  CollectTimedOutData

Defines

#define EWMH_ATOMS_ONLY
#define item(x)   screen->display->atom_##x,
#define N_VALS   6
#define MAX_PREVIEW_SIZE   150.0
#define ICON_OFFSET   6
#define OUTLINE_WIDTH   5
#define _NET_WM_ORIENTATION_HORZ   0
#define _NET_WM_ORIENTATION_VERT   1
#define _NET_WM_TOPLEFT   0
#define _NET_WM_TOPRIGHT   1
#define _NET_WM_BOTTOMRIGHT   2
#define _NET_WM_BOTTOMLEFT   3
#define STARTUP_TIMEOUT   15000

Functions

static char * get_screen_name (MetaDisplay *display, int number)
static void update_num_workspaces (MetaScreen *screen, guint32 timestamp)
static void update_focus_mode (MetaScreen *screen)
static void set_workspace_names (MetaScreen *screen)
static void prefs_changed_callback (MetaPreference pref, gpointer data)
static void set_desktop_geometry_hint (MetaScreen *screen)
static void set_desktop_viewport_hint (MetaScreen *screen)
static void meta_screen_sn_event (SnMonitorEvent *event, void *user_data)
static int set_wm_check_hint (MetaScreen *screen)
static int set_wm_icon_size_hint (MetaScreen *screen)
static void reload_xinerama_infos (MetaScreen *screen)
MetaScreenmeta_screen_new (MetaDisplay *display, int number, guint32 timestamp)
void meta_screen_free (MetaScreen *screen, guint32 timestamp)
static GList * list_windows (MetaScreen *screen)
void meta_screen_manage_all_windows (MetaScreen *screen)
void meta_screen_composite_all_windows (MetaScreen *screen)
MetaScreenmeta_screen_for_x_screen (Screen *xscreen)
static gint ptrcmp (gconstpointer a, gconstpointer b)
static void listify_func (gpointer key, gpointer value, gpointer data)
void meta_screen_foreach_window (MetaScreen *screen, MetaScreenWindowFunc func, gpointer data)
static void queue_draw (MetaScreen *screen, MetaWindow *window, gpointer data)
void meta_screen_queue_frame_redraws (MetaScreen *screen)
static void queue_resize (MetaScreen *screen, MetaWindow *window, gpointer data)
void meta_screen_queue_window_resizes (MetaScreen *screen)
int meta_screen_get_n_workspaces (MetaScreen *screen)
MetaWorkspacemeta_screen_get_workspace_by_index (MetaScreen *screen, int idx)
static void set_number_of_spaces_hint (MetaScreen *screen, int n_spaces)
void meta_screen_set_cursor (MetaScreen *screen, MetaCursor cursor)
void meta_screen_update_cursor (MetaScreen *screen)
static GdkPixbuf * get_window_pixbuf (MetaWindow *window, int *width, int *height)
void meta_screen_ensure_tab_popup (MetaScreen *screen, MetaTabList list_type, MetaTabShowType show_type)
void meta_screen_ensure_workspace_popup (MetaScreen *screen)
MetaWindowmeta_screen_get_mouse_window (MetaScreen *screen, MetaWindow *not_this_one)
const MetaXineramaScreenInfometa_screen_get_xinerama_for_rect (MetaScreen *screen, MetaRectangle *rect)
const MetaXineramaScreenInfometa_screen_get_xinerama_for_window (MetaScreen *screen, MetaWindow *window)
const MetaXineramaScreenInfometa_screen_get_xinerama_neighbor (MetaScreen *screen, int which_xinerama, MetaScreenDirection direction)
void meta_screen_get_natural_xinerama_list (MetaScreen *screen, int **xineramas_list, int *n_xineramas)
const MetaXineramaScreenInfometa_screen_get_current_xinerama (MetaScreen *screen)
void meta_screen_update_workspace_layout (MetaScreen *screen)
void meta_screen_update_workspace_names (MetaScreen *screen)
Window meta_create_offscreen_window (Display *xdisplay, Window parent, long valuemask)
static void set_work_area_hint (MetaScreen *screen)
static gboolean set_work_area_idle_func (MetaScreen *screen)
void meta_screen_queue_workarea_recalc (MetaScreen *screen)
static char * meta_screen_corner_to_string (MetaScreenCorner corner)
void meta_screen_calc_workspace_layout (MetaScreen *screen, int num_workspaces, int current_space, MetaWorkspaceLayout *layout)
void meta_screen_free_workspace_layout (MetaWorkspaceLayout *layout)
static void meta_screen_resize_func (MetaScreen *screen, MetaWindow *window, void *user_data)
void meta_screen_resize (MetaScreen *screen, int width, int height)
void meta_screen_update_showing_desktop_hint (MetaScreen *screen)
static void queue_windows_showing (MetaScreen *screen)
void meta_screen_minimize_all_on_active_workspace_except (MetaScreen *screen, MetaWindow *keep)
void meta_screen_show_desktop (MetaScreen *screen, guint32 timestamp)
void meta_screen_unshow_desktop (MetaScreen *screen)
static gboolean startup_sequence_timeout (void *data)
static void update_startup_feedback (MetaScreen *screen)
static void add_sequence (MetaScreen *screen, SnStartupSequence *sequence)
static void remove_sequence (MetaScreen *screen, SnStartupSequence *sequence)
static void collect_timed_out_foreach (void *element, void *data)
gboolean meta_screen_apply_startup_properties (MetaScreen *screen, MetaWindow *window)
int meta_screen_get_screen_number (MetaScreen *screen)
MetaDisplaymeta_screen_get_display (MetaScreen *screen)
Window meta_screen_get_xroot (MetaScreen *screen)
void meta_screen_get_size (MetaScreen *screen, int *width, int *height)
gpointer meta_screen_get_compositor_data (MetaScreen *screen)
void meta_screen_set_compositor_data (MetaScreen *screen, gpointer compositor)
void meta_screen_set_cm_selection (MetaScreen *screen)
void meta_screen_unset_cm_selection (MetaScreen *screen)


Define Documentation

#define _NET_WM_BOTTOMLEFT   3

Definition at line 1700 of file screen.c.

Referenced by meta_screen_update_workspace_layout().

#define _NET_WM_BOTTOMRIGHT   2

Definition at line 1699 of file screen.c.

Referenced by meta_screen_update_workspace_layout().

#define _NET_WM_ORIENTATION_HORZ   0

Definition at line 1694 of file screen.c.

Referenced by meta_screen_update_workspace_layout().

#define _NET_WM_ORIENTATION_VERT   1

Definition at line 1695 of file screen.c.

Referenced by meta_screen_update_workspace_layout().

#define _NET_WM_TOPLEFT   0

Definition at line 1697 of file screen.c.

Referenced by meta_screen_update_workspace_layout().

#define _NET_WM_TOPRIGHT   1

Definition at line 1698 of file screen.c.

Referenced by meta_screen_update_workspace_layout().

#define EWMH_ATOMS_ONLY

#define ICON_OFFSET   6

#define item (  )     screen->display->atom_##x,

#define MAX_PREVIEW_SIZE   150.0

Definition at line 1191 of file screen.c.

Referenced by get_window_pixbuf().

#define N_VALS   6

Referenced by set_wm_icon_size_hint().

#define OUTLINE_WIDTH   5

#define STARTUP_TIMEOUT   15000

Definition at line 2479 of file screen.c.

Referenced by collect_timed_out_foreach().


Function Documentation

static void add_sequence ( MetaScreen screen,
SnStartupSequence *  sequence 
) [static]

static void collect_timed_out_foreach ( void *  element,
void *  data 
) [static]

static char * get_screen_name ( MetaDisplay display,
int  number 
) [static]

Definition at line 861 of file screen.c.

References _MetaDisplay::xdisplay.

Referenced by meta_screen_new().

static GdkPixbuf* get_window_pixbuf ( MetaWindow window,
int *  width,
int *  height 
) [static]

static GList* list_windows ( MetaScreen screen  )  [static]

static void listify_func ( gpointer  key,
gpointer  value,
gpointer  data 
) [static]

Definition at line 902 of file screen.c.

Window meta_create_offscreen_window ( Display *  xdisplay,
Window  parent,
long  valuemask 
)

Definition at line 1873 of file screen.c.

Referenced by meta_screen_new().

gboolean meta_screen_apply_startup_properties ( MetaScreen screen,
MetaWindow window 
)

void meta_screen_calc_workspace_layout ( MetaScreen screen,
int  num_workspaces,
int  current_space,
MetaWorkspaceLayout layout 
)

void meta_screen_composite_all_windows ( MetaScreen screen  ) 

static char* meta_screen_corner_to_string ( MetaScreenCorner  corner  )  [static]

void meta_screen_ensure_tab_popup ( MetaScreen screen,
MetaTabList  list_type,
MetaTabShowType  show_type 
)

void meta_screen_ensure_workspace_popup ( MetaScreen screen  ) 

MetaScreen* meta_screen_for_x_screen ( Screen *  xscreen  ) 

void meta_screen_foreach_window ( MetaScreen screen,
MetaScreenWindowFunc  func,
gpointer  data 
)

void meta_screen_free ( MetaScreen screen,
guint32  timestamp 
)

void meta_screen_free_workspace_layout ( MetaWorkspaceLayout layout  ) 

gpointer meta_screen_get_compositor_data ( MetaScreen screen  ) 

const MetaXineramaScreenInfo* meta_screen_get_current_xinerama ( MetaScreen screen  ) 

MetaDisplay* meta_screen_get_display ( MetaScreen screen  ) 

MetaWindow* meta_screen_get_mouse_window ( MetaScreen screen,
MetaWindow not_this_one 
)

int meta_screen_get_n_workspaces ( MetaScreen screen  ) 

void meta_screen_get_natural_xinerama_list ( MetaScreen screen,
int **  xineramas_list,
int *  n_xineramas 
)

int meta_screen_get_screen_number ( MetaScreen screen  ) 

void meta_screen_get_size ( MetaScreen screen,
int *  width,
int *  height 
)

MetaWorkspace* meta_screen_get_workspace_by_index ( MetaScreen screen,
int  idx 
)

const MetaXineramaScreenInfo* meta_screen_get_xinerama_for_rect ( MetaScreen screen,
MetaRectangle rect 
)

const MetaXineramaScreenInfo* meta_screen_get_xinerama_for_window ( MetaScreen screen,
MetaWindow window 
)

const MetaXineramaScreenInfo* meta_screen_get_xinerama_neighbor ( MetaScreen screen,
int  which_xinerama,
MetaScreenDirection  direction 
)

Window meta_screen_get_xroot ( MetaScreen screen  ) 

void meta_screen_manage_all_windows ( MetaScreen screen  ) 

void meta_screen_minimize_all_on_active_workspace_except ( MetaScreen screen,
MetaWindow keep 
)

MetaScreen* meta_screen_new ( MetaDisplay display,
int  number,
guint32  timestamp 
)

Definition at line 315 of file screen.c.

References _, _MetaScreen::active_workspace, _MetaScreen::all_keys_grabbed, _MetaScreen::closing, _MetaScreen::columns_of_workspaces, _MetaScreen::compositor_data, _MetaScreen::current_cursor, _MetaScreen::default_depth, _MetaScreen::default_xvisual, _MetaScreen::display, FALSE, _MetaScreen::flash_window, get_screen_name(), _MetaRectangle::height, _MetaScreen::keys_grabbed, _MetaScreen::last_xinerama_index, meta_create_offscreen_window(), META_CURSOR_DEFAULT, meta_error_trap_pop_with_return(), meta_error_trap_push_with_return(), meta_get_replace_current_wm(), meta_prefs_add_listener(), meta_prop_get_cardinal(), meta_screen_get_workspace_by_index(), meta_screen_grab_keys(), meta_screen_set_cursor(), meta_screen_sn_event(), META_SCREEN_TOPLEFT, meta_screen_update_workspace_layout(), meta_stack_new(), meta_ui_new(), meta_warning(), META_WIREFRAME_XOR_LINE_WIDTH, meta_workspace_activate(), meta_workspace_new(), _MetaScreen::n_xinerama_infos, _MetaDisplay::name, _MetaScreen::no_focus_window, NULL, _MetaScreen::number, prefs_changed_callback(), _MetaScreen::rect, reload_xinerama_infos(), _MetaScreen::root_xor_gc, _MetaScreen::rows_of_workspaces, _MetaScreen::screen_name, set_desktop_geometry_hint(), set_desktop_viewport_hint(), set_wm_check_hint(), set_wm_icon_size_hint(), set_workspace_names(), _MetaScreen::stack, _MetaScreen::starting_corner, _MetaScreen::tab_popup, _MetaScreen::ui, update_num_workspaces(), _MetaScreen::vertical_workspaces, _MetaRectangle::width, _MetaScreen::wm_sn_atom, _MetaScreen::wm_sn_selection_window, _MetaScreen::wm_sn_timestamp, _MetaScreen::work_area_idle, _MetaScreen::workspaces, _MetaRectangle::x, _MetaDisplay::xdisplay, _MetaScreen::xinerama_infos, _MetaScreen::xroot, _MetaScreen::xscreen, and _MetaRectangle::y.

void meta_screen_queue_frame_redraws ( MetaScreen screen  ) 

Definition at line 958 of file screen.c.

References meta_screen_foreach_window(), NULL, and queue_draw().

void meta_screen_queue_window_resizes ( MetaScreen screen  ) 

Definition at line 970 of file screen.c.

References meta_screen_foreach_window(), NULL, and queue_resize().

void meta_screen_queue_workarea_recalc ( MetaScreen screen  ) 

void meta_screen_resize ( MetaScreen screen,
int  width,
int  height 
)

static void meta_screen_resize_func ( MetaScreen screen,
MetaWindow window,
void *  user_data 
) [static]

void meta_screen_set_cm_selection ( MetaScreen screen  ) 

Definition at line 2780 of file screen.c.

References _MetaScreen::display, FALSE, _MetaScreen::number, and _MetaDisplay::xdisplay.

Referenced by xrender_manage_screen().

void meta_screen_set_compositor_data ( MetaScreen screen,
gpointer  compositor 
)

Definition at line 2772 of file screen.c.

References _MetaScreen::compositor_data.

Referenced by xrender_manage_screen(), and xrender_unmanage_screen().

void meta_screen_set_cursor ( MetaScreen screen,
MetaCursor  cursor 
)

void meta_screen_show_desktop ( MetaScreen screen,
guint32  timestamp 
)

static void meta_screen_sn_event ( SnMonitorEvent *  event,
void *  user_data 
) [static]

Definition at line 2547 of file screen.c.

References add_sequence(), META_DEBUG_STARTUP, and remove_sequence().

Referenced by meta_screen_new().

void meta_screen_unset_cm_selection ( MetaScreen screen  ) 

Definition at line 2793 of file screen.c.

References _MetaScreen::display, FALSE, _MetaScreen::number, and _MetaDisplay::xdisplay.

Referenced by xrender_unmanage_screen().

void meta_screen_unshow_desktop ( MetaScreen screen  ) 

void meta_screen_update_cursor ( MetaScreen screen  ) 

void meta_screen_update_showing_desktop_hint ( MetaScreen screen  ) 

void meta_screen_update_workspace_layout ( MetaScreen screen  ) 

void meta_screen_update_workspace_names ( MetaScreen screen  ) 

static void prefs_changed_callback ( MetaPreference  pref,
gpointer  data 
) [static]

static gint ptrcmp ( gconstpointer  a,
gconstpointer  b 
) [static]

Definition at line 891 of file screen.c.

static void queue_draw ( MetaScreen screen,
MetaWindow window,
gpointer  data 
) [static]

Definition at line 951 of file screen.c.

References _MetaWindow::frame, and meta_frame_queue_draw().

Referenced by meta_screen_queue_frame_redraws().

static void queue_resize ( MetaScreen screen,
MetaWindow window,
gpointer  data 
) [static]

Definition at line 964 of file screen.c.

References META_QUEUE_MOVE_RESIZE, and meta_window_queue().

Referenced by meta_screen_queue_window_resizes().

static void queue_windows_showing ( MetaScreen screen  )  [static]

static void reload_xinerama_infos ( MetaScreen screen  )  [static]

static void remove_sequence ( MetaScreen screen,
SnStartupSequence *  sequence 
) [static]

Definition at line 2447 of file screen.c.

References META_DEBUG_STARTUP, NULL, and update_startup_feedback().

Referenced by meta_screen_sn_event().

static void set_desktop_geometry_hint ( MetaScreen screen  )  [static]

static void set_desktop_viewport_hint ( MetaScreen screen  )  [static]

static void set_number_of_spaces_hint ( MetaScreen screen,
int  n_spaces 
) [static]

static int set_wm_check_hint ( MetaScreen screen  )  [static]

static int set_wm_icon_size_hint ( MetaScreen screen  )  [static]

static void set_work_area_hint ( MetaScreen screen  )  [static]

static gboolean set_work_area_idle_func ( MetaScreen screen  )  [static]

static void set_workspace_names ( MetaScreen screen  )  [static]

static gboolean startup_sequence_timeout ( void *  data  )  [static]

static void update_focus_mode ( MetaScreen screen  )  [static]

Definition at line 1157 of file screen.c.

Referenced by prefs_changed_callback().

static void update_num_workspaces ( MetaScreen screen,
guint32  timestamp 
) [static]

static void update_startup_feedback ( MetaScreen screen  )  [static]


Generated on Sat Aug 23 22:04:21 2008 for metacity by  doxygen 1.5.5