~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to services/plugins/unity/unitylib/unityX11.h

  • Committer: Package Import Robot
  • Author(s): Nate Muench
  • Date: 2012-01-23 16:09:45 UTC
  • mfrom: (1.4.6) (2.4.26 sid)
  • Revision ID: package-import@ubuntu.com-20120123160945-b6s0r1vkcovucpf3
Tags: 2011.12.20-562307-0ubuntu1
* Merge latest upstream git tag. Fixes building on Precise
  (LP: #898289, LP: #905612)

* Items merged from Debian unstable:
  - debian/control:
    + open-vm-tools recommends open-vm-dkms. (LP: #598933)
    + open-vm-tools now suggests open-vm-toolbox. (LP: #604998)
  (From 2011.08.21-471295-1 release)
  - Updating maintainer and uploaders fields.
  - Removing vcs fields.
  - Removing references to Daniel's old email address.
  - Updating years in copyright file.
  - Updating to standards version 3.9.2.
  - Updating to debhelper version 8.
  - Switching to source format 3.0 (quilt).
  - Removing manual chrpath setting.
  - Removing exclusion from plugins from debhelper shlibs.
  - Rediffing kvers.patch.
  (From 2011.09.23-491607-1 release)
  - Marking binary architecture-dependend packages as linux and kfreebsd
  only.
  - Removing liburiparser-dev from build-depends as upstream dropped
  unity support.
  - Building with libproc-dev on amd64 again.
  - Dropping disabling of dnet support.
  (From 2011.09.23-491607-2 release)
  - Adding doxygen to build-depends for api documentation.
  - Adding libcunit1-dev to build-depends for test suites.
  - Minimizing rules file.
  - Adding open-vm-tools-dev package, containing only the api
    documentation for now.
  (From 2011.09.23-491607-3 release)
  - Sorting overrides in rules alphabetically.
  - Compacting copyright file.
  - Adding udev rule to set timeout for vmware scsi devices
  (From 2011.12.20-562307-1 release)
  - Adding patch to correct typo in upstreams dkms configuration

* Remaining Changes:
  - Remove Stable part of version numbering.
  - debian folder:
    + Re-added open-vm-dkms.postinst & open-vm-dkms.prerm.
      * Allows dkms modules to compile upon installation.
  - debian/control:
    + Re-add open-vm-source and make into a transitional package
      for open-vm-toolbox.
    + Return dependancies that were moved to open-vm-tools back to
      open-vm-toolbox.
  - debian/rules and debian/open-vm-toolbox.lintian-overrides:
    + Make vmware-user-suid-wrapper suid-root
  - debian/rules:
    + Added CFLAGS field with -Wno-deprecated-declarations
      * Will suppress issues with glib 2.31 or later.
    + Add line to copy vmware-xdg-detect-de into place.
    + Install vmware-user.desktop through toolbox package.
  - debian/open-vm-tools.init:
    + Re-add 'modprobe [-r] vmblock'.
    + Add 'modprobe [-r] vmxnet'.
      * Incase it's not loaded during boot.
    + Remove and re-add pcnet32 module
      * Will be done before (remove) and after (readd) vmxnet module
        is added.
      * If vmxnet doesn't exist (aka modules fail to build), pcnet32 can be
        still used for network connectivity.
      * Workaround until a better fix can be done.
  - Re-add gnome-session to debian/local/xautostart.conf
  - Manpages removed (from debian/manpages):
    + vmmemctl.9
    + vmxnet3.9
    + Remove references to manpages that have been removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*********************************************************
2
 
 * Copyright (C) 2007-2008 VMware, Inc. All rights reserved.
3
 
 *
4
 
 * This program is free software; you can redistribute it and/or modify it
5
 
 * under the terms of the GNU Lesser General Public License as published
6
 
 * by the Free Software Foundation version 2.1 and no later version.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful, but
9
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10
 
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
11
 
 * License for more details.
12
 
 *
13
 
 * You should have received a copy of the GNU Lesser General Public License
14
 
 * along with this program; if not, write to the Free Software Foundation, Inc.,
15
 
 * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
16
 
 *
17
 
 *********************************************************/
18
 
 
19
 
/*
20
 
 * unityX11.h --
21
 
 *
22
 
 *    Internal state shared between the various modules that implement Unity for X11.
23
 
 */
24
 
 
25
 
#ifndef _UNITY_X11_H_
26
 
#define _UNITY_X11_H_
27
 
 
28
 
/*
29
 
 * It's necessary to include glib, gtk+, and Xlib before the rest of the header files,
30
 
 * and then #undef bool. This is because Xlib has '#define Bool int', while
31
 
 * vm_basic_types.h has 'typedef char Bool;'.
32
 
 */
33
 
 
34
 
#include "vmware/tools/unity/windowPathFactory.hh"
35
 
 
36
 
extern "C" {
37
 
#include <glib.h>
38
 
#include <gdk/gdkx.h>
39
 
#include <gtk/gtk.h>
40
 
#include <X11/Xlib.h>
41
 
#include <X11/Xmd.h>
42
 
#include <X11/Xatom.h>
43
 
#include <X11/Xutil.h>
44
 
#include <X11/extensions/scrnsaver.h>
45
 
#if defined(ScreenSaverMajorVersion) && defined(ScreenSaverMinorVersion)
46
 
#define VM_HAVE_X11_SS_EXT 1
47
 
#endif
48
 
#include <X11/extensions/shape.h>
49
 
#if defined(ShapeNumberEvents)
50
 
#define VM_HAVE_X11_SHAPE_EXT 1
51
 
#endif
52
 
#undef Bool
53
 
 
54
 
#include "vmware.h"
55
 
#include "vmware/tools/guestrpc.h"
56
 
#include "rpcin.h"
57
 
#include "rpcout.h"
58
 
#include "unity.h"
59
 
#include "unityCommon.h"
60
 
#include "unityPlatform.h"
61
 
#include "debug.h"
62
 
#include "str.h"
63
 
#include "strutil.h"
64
 
#include "util.h"
65
 
#include <string.h>
66
 
#include <unistd.h>
67
 
#include <stdlib.h>
68
 
}
69
 
 
70
 
 
71
 
/*
72
 
 * Warn builders up front that GTK 2 is mandatory.
73
 
 */
74
 
#ifndef GTK2
75
 
#   error UnityX11 depends on GTK+ 2.
76
 
#endif
77
 
 
78
 
 
79
 
/*
80
 
 * These defines are listed in the EWMH spec, but not available in any header file that I
81
 
 * know of.
82
 
 */
83
 
#ifndef _NET_WM_ORIENTATION_HORZ
84
 
#define _NET_WM_ORIENTATION_HORZ 0
85
 
#define _NET_WM_ORIENTATION_VERT 1
86
 
 
87
 
#define _NET_WM_TOPLEFT     0
88
 
#define _NET_WM_TOPRIGHT    1
89
 
#define _NET_WM_BOTTOMRIGHT 2
90
 
#define _NET_WM_BOTTOMLEFT  3
91
 
 
92
 
#define _NET_WM_STATE_REMOVE 0
93
 
#define _NET_WM_STATE_ADD 1
94
 
#endif
95
 
 
96
 
/*
97
 
 * These describe system settings saved when entering Unity mode, and restored upon
98
 
 * exiting.
99
 
 */
100
 
typedef enum {
101
 
   UNITY_UI_SCREENSAVER,
102
 
   UNITY_UI_TASKBAR_VISIBLE,
103
 
#ifdef VM_UNIMPLEMENTED_UNITY_SETTINGS
104
 
   UNITY_UI_DROP_SHADOW,
105
 
   UNITY_UI_MENU_ANIMATION,
106
 
   UNITY_UI_TOOLTIP_ANIMATION,
107
 
   UNITY_UI_WINDOW_ANIMATION,
108
 
   UNITY_UI_FULL_WINDOW_DRAG,
109
 
#endif
110
 
 
111
 
   UNITY_UI_MAX_SETTINGS
112
 
} UnityUISetting;
113
 
 
114
 
typedef enum {
115
 
   UNITY_X11_WM__NET_MOVERESIZE_WINDOW,
116
 
   UNITY_X11_WM__NET_CLOSE_WINDOW,
117
 
   UNITY_X11_WM__NET_RESTACK_WINDOW,
118
 
   UNITY_X11_WM__NET_ACTIVE_WINDOW,
119
 
   UNITY_X11_WM__NET_WM_ACTION_MINIMIZE,
120
 
   UNITY_X11_WM__NET_WM_ACTION_CLOSE,
121
 
   UNITY_X11_WM__NET_WM_ACTION_SHADE,
122
 
   UNITY_X11_WM__NET_WM_ACTION_STICK,
123
 
   UNITY_X11_WM__NET_WM_ACTION_FULLSCREEN,
124
 
   UNITY_X11_WM__NET_WM_ACTION_MAXIMIZE_HORZ,
125
 
   UNITY_X11_WM__NET_WM_ACTION_MAXIMIZE_VERT,
126
 
   UNITY_X11_WM__NET_FRAME_EXTENTS,
127
 
   UNITY_X11_WM__NET_WM_STRUT_PARTIAL,
128
 
   UNITY_X11_WM__NET_WM_STATE_HIDDEN,
129
 
   UNITY_X11_WM__NET_WM_STATE_MINIMIZED,
130
 
 
131
 
   UNITY_X11_MAX_WM_PROTOCOLS
132
 
} UnityX11WMProtocol;
133
 
 
134
 
typedef enum {
135
 
   UNITY_X11_WIN_WM_DELETE_WINDOW,
136
 
   UNITY_X11_MAX_WIN_PROTOCOLS
137
 
} UnityX11WinProtocol;
138
 
 
139
 
 
140
 
/*
141
 
 * UnitySpecialWindow objects track windows that need special treatment, including root
142
 
 * windows and windows that we create.
143
 
 */
144
 
typedef struct UnitySpecialWindow UnitySpecialWindow;
145
 
typedef void (*UnitySpecialEventHandler)(UnityPlatform *up,
146
 
                                         UnitySpecialWindow *usw,
147
 
                                         const XEvent *xevent,
148
 
                                         Window realEventWindow);
149
 
 
150
 
struct UnitySpecialWindow {
151
 
   UnitySpecialEventHandler evHandler;
152
 
   Window *windows;
153
 
   size_t numWindows;
154
 
   Bool windowsAreOwned;
155
 
};
156
 
 
157
 
typedef struct UnityPlatformWindow UnityPlatformWindow;
158
 
 
159
 
 
160
 
/**
161
 
 * Custom Glib source to monitor the Xlib queue and X11 socket(s).
162
 
 *
163
 
 * This structure is "derived from" GSource.  It will be recast and used as
164
 
 * a GSource with Glib functions.
165
 
 */
166
 
 
167
 
typedef struct {
168
 
   GSource base;        ///< Owned by Glib.  Hands off!
169
 
   UnityPlatform *up;   ///< Our running UnityPlatform context.
170
 
   GHashTable *fdTable; ///< file descriptor => GPollFD *.
171
 
} UnityGSource;
172
 
 
173
 
 
174
 
/**
175
 
 * Holds platform-specific data.
176
 
 */
177
 
struct _UnityPlatform {
178
 
   Display *display; // X11 display object
179
 
   long eventTimeDiff; // Diff between X server time and our local time
180
 
   /**
181
 
    * Integrates Unity event sources with the Glib main loop.
182
 
    *
183
 
    * Monitors dedicated Unity X11 socket(s) and the associated Xlib event
184
 
    * queue.  Its lifetime is for the duration that the user is in Unity mode.
185
 
    *
186
 
    * @note
187
 
    * The event source is created in UnityPlatformStartHelperThreads and torn
188
 
    * down in UnityPlatformKillHelperThreads.
189
 
    */
190
 
   UnityGSource *glibSource;
191
 
 
192
 
   struct { // Atoms that we'll find useful
193
 
      Atom _NET_WM_WINDOW_TYPE,
194
 
      _NET_WM_WINDOW_TYPE_DESKTOP,
195
 
      _NET_WM_WINDOW_TYPE_DOCK,
196
 
      _NET_WM_WINDOW_TYPE_TOOLBAR,
197
 
      _NET_WM_WINDOW_TYPE_TOOLTIP,
198
 
      _NET_WM_WINDOW_TYPE_DROPDOWN_MENU,
199
 
      _NET_WM_WINDOW_TYPE_POPUP_MENU,
200
 
      _NET_WM_WINDOW_TYPE_MENU,
201
 
      _NET_WM_WINDOW_TYPE_UTILITY,
202
 
      _NET_WM_WINDOW_TYPE_SPLASH,
203
 
      _NET_WM_WINDOW_TYPE_DIALOG,
204
 
      _NET_WM_WINDOW_TYPE_NORMAL,
205
 
      _NET_WM_WINDOW_TYPE_DND,
206
 
      _NET_WM_ALLOWED_ACTIONS,
207
 
      _NET_WM_ACTION_MOVE,
208
 
      _NET_WM_ACTION_RESIZE,
209
 
      _NET_WM_ACTION_MINIMIZE,
210
 
      _NET_WM_ACTION_SHADE,
211
 
      _NET_WM_ACTION_STICK,
212
 
      _NET_WM_ACTION_MAXIMIZE_HORZ,
213
 
      _NET_WM_ACTION_MAXIMIZE_VERT,
214
 
      _NET_WM_ACTION_FULLSCREEN,
215
 
      _NET_WM_ACTION_CHANGE_DESKTOP,
216
 
      _NET_WM_ACTION_CLOSE,
217
 
      _NET_WM_STATE,
218
 
      _NET_WM_STATE_HIDDEN,
219
 
      _NET_WM_STATE_MODAL,
220
 
      _NET_WM_STATE_STICKY,
221
 
      _NET_WM_STATE_MINIMIZED,
222
 
      _NET_WM_STATE_MAXIMIZED_HORZ,
223
 
      _NET_WM_STATE_MAXIMIZED_VERT,
224
 
      _NET_WM_STATE_SHADED,
225
 
      _NET_WM_STATE_SKIP_TASKBAR,
226
 
      _NET_WM_STATE_SKIP_PAGER,
227
 
      _NET_WM_STATE_FULLSCREEN,
228
 
      _NET_WM_STATE_ABOVE,
229
 
      _NET_WM_STATE_BELOW,
230
 
      _NET_WM_STATE_DEMANDS_ATTENTION,
231
 
      _NET_WM_USER_TIME,
232
 
      _NET_WM_USER_TIME_WINDOW,
233
 
      _NET_ACTIVE_WINDOW,
234
 
      _NET_RESTACK_WINDOW,
235
 
      _NET_WM_PID,
236
 
      _NET_WM_ICON,
237
 
      _NET_MOVERESIZE_WINDOW,
238
 
      _NET_CLOSE_WINDOW,
239
 
      _NET_WM_STRUT,
240
 
      _NET_WM_STRUT_PARTIAL,
241
 
      _NET_NUMBER_OF_DESKTOPS,
242
 
      _NET_WM_DESKTOP,
243
 
      _NET_CURRENT_DESKTOP,
244
 
      _NET_DESKTOP_LAYOUT,
245
 
      _NET_SUPPORTED,
246
 
      _NET_FRAME_EXTENTS,
247
 
      WM_CLASS,
248
 
      WM_CLIENT_LEADER,
249
 
      WM_DELETE_WINDOW,
250
 
      WM_ICON,
251
 
      WM_NAME,
252
 
      WM_PROTOCOLS,
253
 
      WM_STATE,
254
 
      WM_TRANSIENT_FOR,
255
 
      WM_WINDOW_ROLE,
256
 
      COMPOUND_TEXT,
257
 
      UTF8_STRING;
258
 
   } atoms;
259
 
 
260
 
   UnityWindowTracker *tracker;
261
 
   UnityHostCallbacks hostCallbacks;
262
 
 
263
 
   /*
264
 
    * This tracks all toplevel windows, whether or not they are showing through to the
265
 
    * window tracker. It also has entries for client windows (which point to the same
266
 
    * UnityPlatformWindow objects).
267
 
    */
268
 
   HashTable *allWindows;
269
 
   UnityPlatformWindow *topWindow; // For tracking Z-ordering
270
 
 
271
 
   /*
272
 
    * This tracks "special" windows, including root windows, the DnD detection window,
273
 
    * and the work area-faking window(s). It's mainly used to make sure these windows
274
 
    * get proper event handling.
275
 
    */
276
 
   HashTable *specialWindows;
277
 
   UnitySpecialWindow *rootWindows;
278
 
 
279
 
   UnityPlatformWindow *desktopWindow;
280
 
   UnityDnD dnd;
281
 
 
282
 
   UnitySpecialWindow *workAreas;
283
 
 
284
 
   UnityRect *needWorkAreas;
285
 
   int needNumWorkAreas;
286
 
 
287
 
   struct {
288
 
      /*
289
 
       * Hopefully, most of the time the desktopIDs on host and guest
290
 
       * will be the same, but we can't count on it, so these two arrays
291
 
       * translate back and forth between guest and unity desktop IDs.
292
 
       */
293
 
      UnityDesktopId *guestDesktopToUnity;
294
 
      uint32 *unityDesktopToGuest;
295
 
      size_t numDesktops;
296
 
 
297
 
      Atom layoutData[4];
298
 
 
299
 
      Atom savedLayoutData[4];
300
 
      size_t savedNumDesktops;
301
 
      uint32 savedCurrentDesktop;
302
 
      uint32 currentDesktop;
303
 
      /*
304
 
       * Set by the set.desktop.active RPC to indicate which desktop the host is in
305
 
       * when we enter Unity.
306
 
       */
307
 
      uint32 initialDesktop;
308
 
#define UNITY_X11_INITIALDESKTOP_UNSET  MAX_UINT32
309
 
   } desktopInfo;
310
 
 
311
 
   Bool isRunning;
312
 
   Bool stackingChanged;
313
 
 
314
 
   Bool haveOriginalSettings;
315
 
   Bool currentSettings[UNITY_UI_MAX_SETTINGS];
316
 
   Bool originalSettings[UNITY_UI_MAX_SETTINGS];
317
 
   Bool needTaskbarSetting;
318
 
 
319
 
   int savedScreenSaverTimeout;
320
 
 
321
 
   Bool wmProtocols[UNITY_X11_MAX_WM_PROTOCOLS];
322
 
 
323
 
   int shapeEventBase;
324
 
   int shapeErrorBase;
325
 
 
326
 
   vmware::tools::unity::WindowPathFactory* wpFactory;
327
 
};
328
 
 
329
 
/*
330
 
 * Holds per-window platform-specific data.
331
 
 */
332
 
 
333
 
struct UnityPlatformWindow {
334
 
   int refs;
335
 
 
336
 
   /*
337
 
    * In X11, we want to watch both the top-level window (normally created by the window
338
 
    * manager) and the application's window.  The UnityWindowId will correspond to the
339
 
    * former - to save lookups later, we track both of them here, as well as their root
340
 
    * window.
341
 
    */
342
 
   Window toplevelWindow;
343
 
   Window clientWindow;
344
 
   Window rootWindow;
345
 
   int screenNumber;
346
 
   int desktopNumber;
347
 
   int onUnmapDesktopNumber;    ///< @sa wantSetDesktopNumberOnUnmap
348
 
   UnityPlatformWindow *higherWindow;
349
 
   UnityPlatformWindow *lowerWindow;
350
 
 
351
 
   UnityWindowType windowType;
352
 
 
353
 
   struct {
354
 
      DynBuf data;
355
 
      UnityIconSize size;
356
 
      UnityIconType type;
357
 
   } iconPng;
358
 
 
359
 
   Bool windowProtocols[UNITY_X11_MAX_WIN_PROTOCOLS];
360
 
 
361
 
   Bool isRelevant; // Whether the window is relayed through the window tracker
362
 
   Bool isOverrideRedirect; // Allow detecting changes in this attr
363
 
   Bool isViewable;
364
 
   Bool wasViewable;
365
 
   Bool wantInputFocus;
366
 
   /**
367
 
    * Indicates we wish to force a value of _NET_CURRENT_DESKTOP across XUnmapWindow.
368
 
    *
369
 
    * When we unmap a window, its _NET_CURRENT_DESKTOP property is cleared.  There are
370
 
    * some circumstances in which this behavior is undesirable.  (E.g., once we hide
371
 
    * the KDE taskbar, it will only appear on desktop #0 after exiting Unity, as KDE
372
 
    * doesn't automatically remap panel/dock windows as sticky windows.)
373
 
    *
374
 
    * Setting this flag (in combination with setting onUnmapDesktopNumber) causes
375
 
    * us to reset the _NET_CURRENT_DESKTOP property in response to receiving its
376
 
    * PropertyDelete.  If a PropertyNewValue arrives before the -Delete, we'll query
377
 
    * and record the new value into onUnmapDesktopNumber (if the property exists).
378
 
    */
379
 
   Bool wantSetDesktopNumberOnUnmap;
380
 
 
381
 
   /*
382
 
    * Mini state-machine:
383
 
    *
384
 
    * isMaximized, isMinimized, and isHidden can all be set or unset independently
385
 
    * from the host's perspective.
386
 
    *
387
 
    * isMaximized can pretty much be set independently.
388
 
    * Leaving isHidden requires WM_HINTS to be set correctly.
389
 
    * Entering isHidden requires XWithdrawWindow.
390
 
    * If !isHidden, !isMinimized -> isMinimized requires XIconifyWindow()
391
 
    * If !isHidden, isMinimized -> !isMinimized requires just mapping the window.
392
 
    */
393
 
   Bool isHidden;
394
 
   Bool isMinimized;
395
 
   Bool isMaximized;
396
 
 
397
 
   /*
398
 
    * When a client window is reparented by a window manager, a ReparentNotify event
399
 
    * is generated.  We're interested in this event, because it tells us that the
400
 
    * relationship between this UnityPlatformWindow and its top-level and client
401
 
    * windows has changed.
402
 
    *
403
 
    * Per ICCCM §4.1.3.1, we identify the client window as the window within a
404
 
    * tree possessing the WM_STATE property.  Unfortunately, this property may
405
 
    * not yet be set when we receive ReparentNotify.  If that's the case, this flag
406
 
    * is raised such that once we do see a WM_STATE change related to one of
407
 
    * our windows (via a PropertyNotify event), we may act accordingly.
408
 
    */
409
 
   Bool waitingForWmState;
410
 
 
411
 
   /*
412
 
    * It isn't safe to delete a UnityPlatformWindow object in the guts of the
413
 
    * event processing code.  (Example:  processing a DestroyNotify event or
414
 
    * learning that a window is irrelevant to Unity/X11.)  Unfortunately, other
415
 
    * parts of this codebase don't use the ref counting scheme correctly, so
416
 
    * this hack will simply mark a UPW for deletion, and the outermost event
417
 
    * entry point will take care of deleting if set.
418
 
    *
419
 
    * XXX Ditch this flag and instead make use of the reference counting
420
 
    * bits.
421
 
    */
422
 
   Bool deleteWhenSafe;
423
 
 
424
 
   /*
425
 
    * See wm-spec::_NET_FRAME_EXTENTS.
426
 
    */
427
 
   uint32 frameExtents[4];
428
 
};
429
 
 
430
 
/*
431
 
 * Implemented by unityPlatformX11Window.c
432
 
 */
433
 
void UPWindow_ProcessEvent(UnityPlatform *up,
434
 
                           UnityPlatformWindow *upw,
435
 
                           Window realEventWindow,
436
 
                           const XEvent *xevent);
437
 
UnityPlatformWindow *UPWindow_Create(UnityPlatform *up, Window window);
438
 
void UPWindow_CheckRelevance(UnityPlatform *up,
439
 
                             UnityPlatformWindow *upw,
440
 
                             const XEvent *motivator);
441
 
void UPWindow_Ref(UnityPlatform *up, UnityPlatformWindow *upw);
442
 
void UPWindow_Restack(UnityPlatform *up, UnityPlatformWindow *upw, Window above);
443
 
void UPWindow_Unref(UnityPlatform *up, UnityPlatformWindow *upw);
444
 
Bool UPWindow_ProtocolSupported(const UnityPlatform *up,
445
 
                                const UnityPlatformWindow *upw,
446
 
                                UnityX11WinProtocol proto);
447
 
UnityPlatformWindow *UPWindow_Lookup(UnityPlatform *up, Window window);
448
 
void UPWindow_SetUserTime(UnityPlatform *up,
449
 
                          UnityPlatformWindow *upw);
450
 
void UPWindow_SetEWMHDesktop(UnityPlatform *up,
451
 
                             UnityPlatformWindow *upw,
452
 
                             uint32 ewmhDesktopId);
453
 
 
454
 
/*
455
 
 * Implemented by unityPlatformX11.c
456
 
 */
457
 
Bool UnityPlatformWMProtocolSupported(UnityPlatform *up, UnityX11WMProtocol proto);
458
 
Bool UnityPlatformIsRootWindow(UnityPlatform *up, Window window);
459
 
uint32 UnityX11GetCurrentDesktop(UnityPlatform *up);
460
 
void UnityX11SetCurrentDesktop(UnityPlatform *up, uint32 currentDesktop);
461
 
Time UnityPlatformGetServerTime(UnityPlatform *up);
462
 
 
463
 
#define UnityPlatformProcessMainLoop() g_main_context_iteration(NULL, TRUE)
464
 
 
465
 
int UnityPlatformGetErrorCount(UnityPlatform *up);
466
 
void UnityPlatformResetErrorCount(UnityPlatform *up);
467
 
Bool UnityPlatformSetTaskbarVisible(UnityPlatform *up, Bool currentSetting);
468
 
void UnityPlatformSendClientMessage(UnityPlatform *up, Window destWindow,
469
 
                                    Window w, Atom messageType,
470
 
                                    int format, int numItems, const void *data);
471
 
void UnityPlatformSyncDesktopConfig(UnityPlatform *up);
472
 
void UnityX11SaveSystemSettings(UnityPlatform *up);
473
 
void UnityX11RestoreSystemSettings(UnityPlatform *up);
474
 
size_t UnityPlatformGetNumVirtualDesktops(UnityPlatform *up);
475
 
void UnityPlatformGetVirtualDesktopLayout(UnityPlatform *up, Atom *layoutData);
476
 
const char *UnityPlatformGetEventString(UnityPlatform *up, int type);
477
 
 
478
 
gboolean UnityX11HandleEvents(gpointer data);
479
 
 
480
 
 
481
 
/*
482
 
 * Implemented in x11Event.c.
483
 
 */
484
 
 
485
 
void UnityX11EventEstablishSource(UnityPlatform *up);
486
 
void UnityX11EventTeardownSource(UnityPlatform *up);
487
 
 
488
 
 
489
 
/*
490
 
 * Implemented in x11Util.c.
491
 
 */
492
 
 
493
 
Bool UnityX11Util_IsWindowDecorationWidget(UnityPlatform *up,
494
 
                                           Window operand);
495
 
 
496
 
#endif