~ubuntu-branches/ubuntu/raring/metacity/raring

« back to all changes in this revision

Viewing changes to .pc/18-auto-maximize-windows.patch/src/core/window-private.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-08-23 11:12:43 UTC
  • mfrom: (1.2.64) (2.1.13 quantal-proposed)
  • Revision ID: package-import@ubuntu.com-20120823111243-v2ome3yisozc1dhw
* Resync with Debian & refresh patches. (LP: #1032120, LP: #1035261)
  Remaining changes:
* debian/control:
  - Suggest gnome-themes-standard instead of recommend
  - Add Vcs-Bzr link
* debian/metacity-common.gsettings-override:
  - Set Ubuntu default button layout order for Classic session
  - Drop previous gconf overrides as obsolete
* debian/patches/04_support_drag_drop_with_alt_tab.patch:
  - Support alt-tab during drag and drop.
* debian/patches/05_raise_on_click_for_click_mode.patch:
  - Use raise on click option.
* debian/patches/06_Add_UXD_shadows_and_borders.patch:
  - patch for a new key in the ubuntu theme for shows and borders
* debian/patches/10_no-ws-switcher.patch:
  - Don't show the workspace switcher if we only have one.
* debian/patches/12_dont-show-as-user.patch:
  - Don't show "as user" in title bar.
* debian/patches/13_better_support_for_button_layout.patch:
  - Corrected support for buttons backgrounds with transparency
* debian/patches/14_wrong_colormap.patch:
  - Use correct colormap to avoid crash with client side decorations
* debian/patches/20_do-not-place-windows-over-the-launcher.patch:
  - Try to avoid an already visible launcher in intellihide mode when
    initially positioning new windows.
* debian/patches/21_fix_compositing_startup.patch:
  Fix some weird rendering effect at startup with compositing activated
* debian/patches/100_fade_on_long_title.patch:
  - Fade on the end if the title is too long.
* debian/patches/102_workarea.patch,
  debian/patches/103_struts_in_the_middle.patch,
  debian/patches/104_workarea_union.patch:
  - Add barriers and multimonitor strut support for unity-2d
* debian/patches/104_workarea_union.patch:
  - Ensure each screen_region generated by
    meta_rectangle_get_minimal_spanning_set_for_region is not outside
    the xinerama screens
* Dropped patch:
  - 11_hide_tooltip_on_decorator.patch: Obsolete
* debian/patches/03_strict_focus.patch:
  - Disabled. This needs gsettings-desktop-schemas to be patched if
    we want to bring this back
* Disabled Unity 2D-related patches that need porting to gsettings:
  - 15_show_maximized_titlebars.patch
  - 16-capture-before-unmap.patch
  - 17-workspace-switcher-cycle.patch
  - 18-auto-maximize-windows.patch
  - 19_add_unity_hud_configuration.patch
  - 101_override_gconf_settings.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2
 
 
3
 
/**
4
 
 * \file window-private.h  Windows which Metacity manages
5
 
 *
6
 
 * Managing X windows.
7
 
 * This file contains methods on this class which are available to
8
 
 * routines in core but not outside it.  (See window.h for the routines
9
 
 * which the rest of the world is allowed to use.)
10
 
 */
11
 
 
12
 
/* 
13
 
 * Copyright (C) 2001 Havoc Pennington
14
 
 * Copyright (C) 2002 Red Hat, Inc.
15
 
 * Copyright (C) 2003, 2004 Rob Adams
16
 
 * Copyright (C) 2004-2006 Elijah Newren
17
 
 * 
18
 
 * This program is free software; you can redistribute it and/or
19
 
 * modify it under the terms of the GNU General Public License as
20
 
 * published by the Free Software Foundation; either version 2 of the
21
 
 * License, or (at your option) any later version.
22
 
 *
23
 
 * This program is distributed in the hope that it will be useful, but
24
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of
25
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26
 
 * General Public License for more details.
27
 
 * 
28
 
 * You should have received a copy of the GNU General Public License
29
 
 * along with this program; if not, write to the Free Software
30
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31
 
 * 02111-1307, USA.
32
 
 */
33
 
 
34
 
#ifndef META_WINDOW_PRIVATE_H
35
 
#define META_WINDOW_PRIVATE_H
36
 
 
37
 
#include <config.h>
38
 
#include "window.h"
39
 
#include "screen-private.h"
40
 
#include "util.h"
41
 
#include "stack.h"
42
 
#include "iconcache.h"
43
 
#include <X11/Xutil.h>
44
 
#include <gdk-pixbuf/gdk-pixbuf.h>
45
 
 
46
 
typedef struct _MetaGroup MetaGroup;
47
 
typedef struct _MetaWindowQueue MetaWindowQueue;
48
 
 
49
 
typedef gboolean (*MetaWindowForeachFunc) (MetaWindow *window,
50
 
                                           void       *data);
51
 
 
52
 
typedef enum
53
 
{
54
 
  META_WINDOW_NORMAL,
55
 
  META_WINDOW_DESKTOP,
56
 
  META_WINDOW_DOCK,
57
 
  META_WINDOW_DIALOG,
58
 
  META_WINDOW_MODAL_DIALOG,
59
 
  META_WINDOW_TOOLBAR,
60
 
  META_WINDOW_MENU,
61
 
  META_WINDOW_UTILITY,
62
 
  META_WINDOW_SPLASHSCREEN
63
 
} MetaWindowType;
64
 
 
65
 
typedef enum
66
 
{
67
 
  META_MAXIMIZE_HORIZONTAL = 1 << 0,
68
 
  META_MAXIMIZE_VERTICAL   = 1 << 1
69
 
} MetaMaximizeFlags;
70
 
 
71
 
typedef enum {
72
 
  META_CLIENT_TYPE_UNKNOWN = 0,
73
 
  META_CLIENT_TYPE_APPLICATION = 1,
74
 
  META_CLIENT_TYPE_PAGER = 2,
75
 
  META_CLIENT_TYPE_MAX_RECOGNIZED = 2
76
 
} MetaClientType;
77
 
 
78
 
typedef enum {
79
 
  META_QUEUE_CALC_SHOWING = 1 << 0,
80
 
  META_QUEUE_MOVE_RESIZE  = 1 << 1,
81
 
  META_QUEUE_UPDATE_ICON  = 1 << 2,
82
 
} MetaQueueType;
83
 
 
84
 
#define NUMBER_OF_QUEUES 3
85
 
 
86
 
struct _MetaWindow
87
 
{
88
 
  MetaDisplay *display;
89
 
  MetaScreen *screen;
90
 
  MetaWorkspace *workspace;
91
 
  Window xwindow;
92
 
  /* may be NULL! not all windows get decorated */
93
 
  MetaFrame *frame;
94
 
  int depth;
95
 
  Visual *xvisual;
96
 
  Colormap colormap;
97
 
  char *desc; /* used in debug spew */
98
 
  char *title;
99
 
 
100
 
  char *icon_name;
101
 
  GdkPixbuf *icon;
102
 
  GdkPixbuf *mini_icon;
103
 
  MetaIconCache icon_cache;
104
 
  Pixmap wm_hints_pixmap;
105
 
  Pixmap wm_hints_mask;
106
 
  
107
 
  MetaWindowType type;
108
 
  Atom type_atom;
109
 
  
110
 
  /* NOTE these five are not in UTF-8, we just treat them as random
111
 
   * binary data
112
 
   */
113
 
  char *res_class;
114
 
  char *res_name;
115
 
  char *role;
116
 
  char *sm_client_id;
117
 
  char *wm_client_machine;
118
 
  char *startup_id;
119
 
 
120
 
  int net_wm_pid;
121
 
  
122
 
  Window xtransient_for;
123
 
  Window xgroup_leader;
124
 
  Window xclient_leader;
125
 
 
126
 
  /* Initial workspace property */
127
 
  int initial_workspace;  
128
 
  
129
 
  /* Initial timestamp property */
130
 
  guint32 initial_timestamp;  
131
 
  
132
 
  /* Whether we're maximized */
133
 
  guint maximized_horizontally : 1;
134
 
  guint maximized_vertically : 1;
135
 
 
136
 
  /* Whether we have to maximize/minimize after placement */
137
 
  guint maximize_horizontally_after_placement : 1;
138
 
  guint maximize_vertically_after_placement : 1;
139
 
  guint minimize_after_placement : 1;
140
 
 
141
 
  /* Whether we're shaded */
142
 
  guint shaded : 1;
143
 
 
144
 
  /* Whether we're fullscreen */
145
 
  guint fullscreen : 1;
146
 
 
147
 
  /* Whether we have to fullscreen after placement */
148
 
  guint fullscreen_after_placement : 1;
149
 
 
150
 
  /* Area to cover when in fullscreen mode.  If _NET_WM_FULLSCREEN_MONITORS has
151
 
   * been overridden (via a client message), the window will cover the union of
152
 
   * these monitors.  If not, this is the single monitor which the window's
153
 
   * origin is on. */
154
 
  long fullscreen_monitors[4];
155
 
  
156
 
  /* Whether we're trying to constrain the window to be fully onscreen */
157
 
  guint require_fully_onscreen : 1;
158
 
 
159
 
  /* Whether we're trying to constrain the window to be on a single xinerama */
160
 
  guint require_on_single_xinerama : 1;
161
 
 
162
 
  /* Whether we're trying to constrain the window's titlebar to be onscreen */
163
 
  guint require_titlebar_visible : 1;
164
 
 
165
 
  /* Whether we're sticky in the multi-workspace sense
166
 
   * (vs. the not-scroll-with-viewport sense, we don't
167
 
   * have no stupid viewports)
168
 
   */
169
 
  guint on_all_workspaces : 1;
170
 
 
171
 
  /* Minimize is the state controlled by the minimize button */
172
 
  guint minimized : 1;
173
 
  guint was_minimized : 1;
174
 
  guint tab_unminimized : 1;
175
 
 
176
 
  /* Whether the window is mapped; actual server-side state
177
 
   * see also unmaps_pending
178
 
   */
179
 
  guint mapped : 1;
180
 
  
181
 
  /* Iconic is the state in WM_STATE; happens for workspaces/shading
182
 
   * in addition to minimize
183
 
   */
184
 
  guint iconic : 1;
185
 
  /* initially_iconic is the WM_HINTS setting when we first manage
186
 
   * the window. It's taken to mean initially minimized.
187
 
   */
188
 
  guint initially_iconic : 1;
189
 
 
190
 
  /* whether an initial workspace was explicitly set */
191
 
  guint initial_workspace_set : 1;
192
 
  
193
 
  /* whether an initial timestamp was explicitly set */
194
 
  guint initial_timestamp_set : 1;
195
 
  
196
 
  /* whether net_wm_user_time has been set yet */
197
 
  guint net_wm_user_time_set : 1;
198
 
  
199
 
  /* These are the flags from WM_PROTOCOLS */
200
 
  guint take_focus : 1;
201
 
  guint delete_window : 1;
202
 
  guint net_wm_ping : 1;
203
 
  /* Globally active / No input */
204
 
  guint input : 1;
205
 
  
206
 
  /* MWM hints about features of window */
207
 
  guint mwm_decorated : 1;
208
 
  guint mwm_border_only : 1;
209
 
  guint mwm_has_close_func : 1;
210
 
  guint mwm_has_minimize_func : 1;
211
 
  guint mwm_has_maximize_func : 1;
212
 
  guint mwm_has_move_func : 1;
213
 
  guint mwm_has_resize_func : 1;
214
 
  
215
 
  /* Computed features of window */
216
 
  guint decorated : 1;
217
 
  guint border_only : 1;
218
 
  guint always_sticky : 1;
219
 
  guint has_close_func : 1;
220
 
  guint has_minimize_func : 1;
221
 
  guint has_maximize_func : 1;
222
 
  guint has_shade_func : 1;
223
 
  guint has_move_func : 1;
224
 
  guint has_resize_func : 1;
225
 
  guint has_fullscreen_func : 1;
226
 
  
227
 
  /* Weird "_NET_WM_STATE_MODAL" flag */
228
 
  guint wm_state_modal : 1;
229
 
 
230
 
  /* TRUE if the client forced these on */
231
 
  guint wm_state_skip_taskbar : 1;
232
 
  guint wm_state_skip_pager : 1;
233
 
 
234
 
  /* Computed whether to skip taskbar or not */
235
 
  guint skip_taskbar : 1;
236
 
  guint skip_pager : 1;
237
 
 
238
 
  /* TRUE if client set these */
239
 
  guint wm_state_above : 1;
240
 
  guint wm_state_below : 1;
241
 
 
242
 
  /* EWHH demands attention flag */
243
 
  guint wm_state_demands_attention : 1;
244
 
  
245
 
  /* this flag tracks receipt of focus_in focus_out and
246
 
   * determines whether we draw the focus
247
 
   */
248
 
  guint has_focus : 1;
249
 
  
250
 
  /* Have we placed this window? */
251
 
  guint placed : 1;
252
 
 
253
 
  /* Must we force_save_user_window_placement? */
254
 
  guint force_save_user_rect : 1;
255
 
 
256
 
  /* Is this not a transient of the focus window which is being denied focus? */
257
 
  guint denied_focus_and_not_transient : 1;
258
 
 
259
 
  /* Has this window not ever been shown yet? */
260
 
  guint showing_for_first_time : 1;
261
 
 
262
 
  /* Are we in meta_window_free()? */
263
 
  guint unmanaging : 1;
264
 
 
265
 
  /* Are we in meta_window_new()? */
266
 
  guint constructing : 1;
267
 
  
268
 
  /* Are we in the various queues? (Bitfield: see META_WINDOW_IS_IN_QUEUE) */
269
 
  guint is_in_queues : NUMBER_OF_QUEUES;
270
 
 
271
 
  /* Used by keybindings.c */
272
 
  guint keys_grabbed : 1;     /* normal keybindings grabbed */
273
 
  guint grab_on_frame : 1;    /* grabs are on the frame */
274
 
  guint all_keys_grabbed : 1; /* AnyKey grabbed */
275
 
  
276
 
  /* Set if the reason for unmanaging the window is that
277
 
   * it was withdrawn
278
 
   */
279
 
  guint withdrawn : 1;
280
 
 
281
 
  /* TRUE if constrain_position should calc placement.
282
 
   * only relevant if !window->placed
283
 
   */
284
 
  guint calc_placement : 1;
285
 
 
286
 
  /* Transient parent is a root window */
287
 
  guint transient_parent_is_root_window : 1;
288
 
 
289
 
  /* Info on which props we got our attributes from */
290
 
  guint using_net_wm_name              : 1; /* vs. plain wm_name */
291
 
  guint using_net_wm_visible_name      : 1; /* tracked so we can clear it */
292
 
  guint using_net_wm_icon_name         : 1; /* vs. plain wm_icon_name */
293
 
  guint using_net_wm_visible_icon_name : 1; /* tracked so we can clear it */
294
 
 
295
 
  /* has a shape mask */
296
 
  guint has_shape : 1;
297
 
 
298
 
  /* icon props have changed */
299
 
  guint need_reread_icon : 1;
300
 
  
301
 
  /* if TRUE, window was maximized at start of current grab op */
302
 
  guint shaken_loose : 1;
303
 
 
304
 
  /* if TRUE we have a grab on the focus click buttons */
305
 
  guint have_focus_click_grab : 1;
306
 
 
307
 
  /* if TRUE, application is buggy and SYNC resizing is turned off */
308
 
  guint disable_sync : 1;
309
 
 
310
 
  /* Note: can be NULL */
311
 
  GSList *struts;
312
 
 
313
 
#ifdef HAVE_XSYNC
314
 
  /* XSync update counter */
315
 
  XSyncCounter sync_request_counter;
316
 
  guint sync_request_serial;
317
 
  GTimeVal sync_request_time;
318
 
#endif
319
 
  
320
 
  /* Number of UnmapNotify that are caused by us, if
321
 
   * we get UnmapNotify with none pending then the client
322
 
   * is withdrawing the window.
323
 
   */
324
 
  int unmaps_pending;
325
 
 
326
 
  /* set to the most recent user-interaction event timestamp that we
327
 
     know about for this window */
328
 
  guint32 net_wm_user_time;
329
 
 
330
 
  /* window that gets updated net_wm_user_time values */
331
 
  Window user_time_window;
332
 
  
333
 
  /* The size we set the window to last (i.e. what we believe
334
 
   * to be its actual size on the server). The x, y are
335
 
   * the actual server-side x,y so are relative to the frame
336
 
   * (meaning that they just hold the frame width and height) 
337
 
   * or the root window (meaning they specify the location
338
 
   * of the top left of the inner window) as appropriate.
339
 
   */
340
 
  MetaRectangle rect;
341
 
 
342
 
  /* The geometry to restore when we unmaximize.  The position is in
343
 
   * root window coords, even if there's a frame, which contrasts with
344
 
   * window->rect above.  Note that this gives the position and size
345
 
   * of the client window (i.e. ignoring the frame).
346
 
   */
347
 
  MetaRectangle saved_rect;
348
 
 
349
 
  /* This is the geometry the window had after the last user-initiated
350
 
   * move/resize operations. We use this whenever we are moving the
351
 
   * implicitly (for example, if we move to avoid a panel, we can snap
352
 
   * back to this position if the panel moves again).  Note that this
353
 
   * gives the position and size of the client window (i.e. ignoring
354
 
   * the frame).
355
 
   *
356
 
   * Position valid if user_has_moved, size valid if user_has_resized
357
 
   *
358
 
   * Position always in root coords, unlike window->rect.
359
 
   */
360
 
  MetaRectangle user_rect;
361
 
  
362
 
  /* Requested geometry */
363
 
  int border_width;
364
 
  /* x/y/w/h here get filled with ConfigureRequest values */
365
 
  XSizeHints size_hints;
366
 
 
367
 
  /* Managed by stack.c */
368
 
  MetaStackLayer layer;
369
 
  int stack_position; /* see comment in stack.h */
370
 
  
371
 
  /* Current dialog open for this window */
372
 
  int dialog_pid;
373
 
 
374
 
  /* maintained by group.c */
375
 
  MetaGroup *group;
376
 
};
377
 
 
378
 
/* These differ from window->has_foo_func in that they consider
379
 
 * the dynamic window state such as "maximized", not just the
380
 
 * window's type
381
 
 */
382
 
#define META_WINDOW_MAXIMIZED(w)       ((w)->maximized_horizontally && \
383
 
                                        (w)->maximized_vertically)
384
 
#define META_WINDOW_MAXIMIZED_VERTICALLY(w)    ((w)->maximized_vertically)
385
 
#define META_WINDOW_MAXIMIZED_HORIZONTALLY(w)  ((w)->maximized_horizontally)
386
 
#define META_WINDOW_ALLOWS_MOVE(w)     ((w)->has_move_func && !(w)->fullscreen)
387
 
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w)   ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !(w)->fullscreen && !(w)->shaded)
388
 
#define META_WINDOW_ALLOWS_RESIZE(w)   (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) &&                \
389
 
                                        (((w)->size_hints.min_width < (w)->size_hints.max_width) ||  \
390
 
                                         ((w)->size_hints.min_height < (w)->size_hints.max_height)))
391
 
#define META_WINDOW_ALLOWS_HORIZONTAL_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && (w)->size_hints.min_width < (w)->size_hints.max_width)
392
 
#define META_WINDOW_ALLOWS_VERTICAL_RESIZE(w)   (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && (w)->size_hints.min_height < (w)->size_hints.max_height)
393
 
 
394
 
MetaWindow* meta_window_new                (MetaDisplay *display,
395
 
                                            Window       xwindow,
396
 
                                            gboolean     must_be_viewable);
397
 
MetaWindow* meta_window_new_with_attrs     (MetaDisplay *display,
398
 
                                            Window       xwindow,
399
 
                                            gboolean     must_be_viewable,
400
 
                                            XWindowAttributes *attrs);
401
 
void        meta_window_free               (MetaWindow  *window,
402
 
                                            guint32      timestamp);
403
 
void        meta_window_calc_showing       (MetaWindow  *window);
404
 
void        meta_window_queue              (MetaWindow  *window,
405
 
                                            guint queuebits);
406
 
void        meta_window_minimize           (MetaWindow  *window);
407
 
void        meta_window_unminimize         (MetaWindow  *window);
408
 
void        meta_window_maximize           (MetaWindow        *window,
409
 
                                            MetaMaximizeFlags  directions);
410
 
void        meta_window_maximize_internal  (MetaWindow        *window,
411
 
                                            MetaMaximizeFlags  directions,
412
 
                                            MetaRectangle     *saved_rect);
413
 
void        meta_window_unmaximize         (MetaWindow        *window,
414
 
                                            MetaMaximizeFlags  directions);
415
 
void        meta_window_make_above         (MetaWindow  *window);
416
 
void        meta_window_unmake_above       (MetaWindow  *window);
417
 
void        meta_window_shade              (MetaWindow  *window,
418
 
                                            guint32      timestamp);
419
 
void        meta_window_unshade            (MetaWindow  *window,
420
 
                                            guint32      timestamp);
421
 
void        meta_window_change_workspace   (MetaWindow  *window,
422
 
                                            MetaWorkspace *workspace);
423
 
void        meta_window_stick              (MetaWindow  *window);
424
 
void        meta_window_unstick            (MetaWindow  *window);
425
 
 
426
 
void        meta_window_activate           (MetaWindow  *window,
427
 
                                            guint32      current_time);
428
 
void        meta_window_activate_with_workspace  (MetaWindow    *window,
429
 
                                                  guint32        current_time,
430
 
                                                  MetaWorkspace *workspace);   
431
 
void        meta_window_make_fullscreen_internal (MetaWindow    *window);
432
 
void        meta_window_make_fullscreen    (MetaWindow  *window);
433
 
void        meta_window_unmake_fullscreen  (MetaWindow  *window);
434
 
void        meta_window_update_fullscreen_monitors (MetaWindow    *window,
435
 
                                                    unsigned long  top,
436
 
                                                    unsigned long  bottom,
437
 
                                                    unsigned long  left,
438
 
                                                    unsigned long  right);
439
 
 
440
 
/* args to move are window pos, not frame pos */
441
 
void        meta_window_move               (MetaWindow  *window,
442
 
                                            gboolean     user_op,
443
 
                                            int          root_x_nw,
444
 
                                            int          root_y_nw);
445
 
void        meta_window_resize             (MetaWindow  *window,
446
 
                                            gboolean     user_op,
447
 
                                            int          w,
448
 
                                            int          h);
449
 
void        meta_window_move_resize        (MetaWindow  *window,
450
 
                                            gboolean     user_op,
451
 
                                            int          root_x_nw,
452
 
                                            int          root_y_nw,
453
 
                                            int          w,
454
 
                                            int          h);
455
 
void        meta_window_resize_with_gravity (MetaWindow  *window,
456
 
                                             gboolean     user_op,
457
 
                                             int          w,
458
 
                                             int          h,
459
 
                                             int          gravity);
460
 
 
461
 
 
462
 
/* Return whether the window would be showing if we were on its workspace */
463
 
gboolean    meta_window_showing_on_its_workspace (MetaWindow *window);
464
 
 
465
 
/* Return whether the window should be currently mapped */
466
 
gboolean    meta_window_should_be_showing   (MetaWindow  *window);
467
 
 
468
 
/* See warning in window.c about this function */
469
 
gboolean    __window_is_terminal (MetaWindow *window);
470
 
 
471
 
void        meta_window_update_struts      (MetaWindow  *window);
472
 
 
473
 
/* this gets root coords */
474
 
void        meta_window_get_position       (MetaWindow  *window,
475
 
                                            int         *x,
476
 
                                            int         *y);
477
 
 
478
 
/* Gets root coords for x, y, width & height of client window; uses
479
 
 * meta_window_get_position for x & y.
480
 
 */
481
 
void        meta_window_get_client_root_coords (MetaWindow    *window,
482
 
                                                MetaRectangle *rect);
483
 
 
484
 
/* gets position we need to set to stay in current position,
485
 
 * assuming position will be gravity-compensated. i.e.
486
 
 * this is the position a client would send in a configure
487
 
 * request.
488
 
 */
489
 
void        meta_window_get_gravity_position (MetaWindow  *window,
490
 
                                              int          gravity,
491
 
                                              int         *x,
492
 
                                              int         *y);
493
 
/* Get geometry for saving in the session; x/y are gravity
494
 
 * position, and w/h are in resize inc above the base size.
495
 
 */
496
 
void        meta_window_get_geometry         (MetaWindow  *window,
497
 
                                              int         *x,
498
 
                                              int         *y,
499
 
                                              int         *width,
500
 
                                              int         *height);
501
 
void        meta_window_get_outer_rect       (const MetaWindow *window,
502
 
                                              MetaRectangle    *rect);
503
 
void        meta_window_get_xor_rect         (MetaWindow          *window,
504
 
                                              const MetaRectangle *grab_wireframe_rect,
505
 
                                              MetaRectangle       *xor_rect);
506
 
void        meta_window_begin_wireframe (MetaWindow *window);
507
 
void        meta_window_update_wireframe (MetaWindow *window,
508
 
                                          int         x,
509
 
                                          int         y,
510
 
                                          int         width,
511
 
                                          int         height);
512
 
void        meta_window_end_wireframe (MetaWindow *window);
513
 
 
514
 
void        meta_window_delete             (MetaWindow  *window,
515
 
                                            guint32      timestamp);
516
 
void        meta_window_kill               (MetaWindow  *window);
517
 
void        meta_window_focus              (MetaWindow  *window,
518
 
                                            guint32      timestamp);
519
 
void        meta_window_raise              (MetaWindow  *window);
520
 
void        meta_window_lower              (MetaWindow  *window);
521
 
 
522
 
void        meta_window_update_unfocused_button_grabs (MetaWindow *window);
523
 
 
524
 
/* Sends a client message */
525
 
void meta_window_send_icccm_message (MetaWindow *window,
526
 
                                     Atom        atom,
527
 
                                     guint32     timestamp);
528
 
 
529
 
 
530
 
void     meta_window_move_resize_request(MetaWindow *window,
531
 
                                         guint       value_mask,
532
 
                                         int         gravity,
533
 
                                         int         x,
534
 
                                         int         y,
535
 
                                         int         width,
536
 
                                         int         height);
537
 
gboolean meta_window_configure_request (MetaWindow *window,
538
 
                                        XEvent     *event);
539
 
gboolean meta_window_property_notify   (MetaWindow *window,
540
 
                                        XEvent     *event);
541
 
gboolean meta_window_client_message    (MetaWindow *window,
542
 
                                        XEvent     *event);
543
 
gboolean meta_window_notify_focus      (MetaWindow *window,
544
 
                                        XEvent     *event);
545
 
 
546
 
void     meta_window_set_current_workspace_hint (MetaWindow *window);
547
 
 
548
 
unsigned long meta_window_get_net_wm_desktop (MetaWindow *window);
549
 
 
550
 
void meta_window_show_menu (MetaWindow *window,
551
 
                            int         root_x,
552
 
                            int         root_y,
553
 
                            int         button,
554
 
                            guint32     timestamp);
555
 
 
556
 
gboolean meta_window_titlebar_is_onscreen    (MetaWindow *window);
557
 
void     meta_window_shove_titlebar_onscreen (MetaWindow *window);
558
 
 
559
 
void meta_window_set_gravity (MetaWindow *window,
560
 
                              int         gravity);
561
 
 
562
 
void meta_window_handle_mouse_grab_op_event (MetaWindow *window,
563
 
                                             XEvent     *event);
564
 
 
565
 
GList* meta_window_get_workspaces (MetaWindow *window);
566
 
 
567
 
gboolean meta_window_located_on_workspace (MetaWindow    *window,
568
 
                                           MetaWorkspace *workspace);
569
 
 
570
 
void meta_window_get_work_area_current_xinerama (MetaWindow    *window,
571
 
                                                 MetaRectangle *area);
572
 
void meta_window_get_work_area_for_xinerama     (MetaWindow    *window,
573
 
                                                 int            which_xinerama,
574
 
                                                 MetaRectangle *area);
575
 
void meta_window_get_work_area_all_xineramas    (MetaWindow    *window,
576
 
                                                 MetaRectangle *area);
577
 
 
578
 
 
579
 
gboolean meta_window_same_application (MetaWindow *window,
580
 
                                       MetaWindow *other_window);
581
 
 
582
 
#define META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE(w) \
583
 
  ((w)->type != META_WINDOW_DOCK && (w)->type != META_WINDOW_DESKTOP)
584
 
#define META_WINDOW_IN_NORMAL_TAB_CHAIN(w) \
585
 
  (((w)->input || (w)->take_focus ) && META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w) && (!(w)->skip_taskbar))
586
 
#define META_WINDOW_IN_DOCK_TAB_CHAIN(w) \
587
 
  (((w)->input || (w)->take_focus) && (! META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w) || (w)->skip_taskbar))
588
 
#define META_WINDOW_IN_GROUP_TAB_CHAIN(w, g) \
589
 
  (((w)->input || (w)->take_focus) && (!g || meta_window_get_group(w)==g))
590
 
 
591
 
void meta_window_refresh_resize_popup (MetaWindow *window);
592
 
 
593
 
void meta_window_free_delete_dialog (MetaWindow *window);
594
 
 
595
 
void     meta_window_foreach_transient        (MetaWindow            *window,
596
 
                                               MetaWindowForeachFunc  func,
597
 
                                               void                  *data);
598
 
gboolean meta_window_is_ancestor_of_transient (MetaWindow            *window,
599
 
                                               MetaWindow            *transient);
600
 
void     meta_window_foreach_ancestor         (MetaWindow            *window,
601
 
                                               MetaWindowForeachFunc  func,
602
 
                                               void                  *data);
603
 
MetaWindow* meta_window_find_root_ancestor    (MetaWindow *window);
604
 
 
605
 
 
606
 
void meta_window_begin_grab_op (MetaWindow *window,
607
 
                                MetaGrabOp  op,
608
 
                                gboolean    frame_action,
609
 
                                guint32     timestamp);
610
 
 
611
 
void meta_window_update_keyboard_resize (MetaWindow *window,
612
 
                                         gboolean    update_cursor);
613
 
void meta_window_update_keyboard_move   (MetaWindow *window);
614
 
 
615
 
void meta_window_update_layer (MetaWindow *window);
616
 
 
617
 
gboolean meta_window_get_icon_geometry (MetaWindow    *window,
618
 
                                        MetaRectangle *rect);
619
 
 
620
 
const char* meta_window_get_startup_id (MetaWindow *window);
621
 
 
622
 
void meta_window_recalc_features    (MetaWindow *window);
623
 
void meta_window_recalc_window_type (MetaWindow *window);
624
 
 
625
 
void meta_window_stack_just_above (MetaWindow *window,
626
 
                                   MetaWindow *above_this_one);
627
 
void meta_window_stack_just_below (MetaWindow *window,
628
 
                                   MetaWindow *below_this_one);
629
 
 
630
 
void meta_window_set_user_time (MetaWindow *window,
631
 
                                guint32     timestamp);
632
 
 
633
 
void meta_window_set_demands_attention (MetaWindow *window);
634
 
 
635
 
void meta_window_unset_demands_attention (MetaWindow *window);
636
 
 
637
 
void meta_window_update_icon_now (MetaWindow *window);
638
 
 
639
 
void meta_window_update_role (MetaWindow *window);
640
 
void meta_window_update_net_wm_type (MetaWindow *window);
641
 
 
642
 
#endif