Skip to content

Commit 109b2a9

Browse files
committed
Start fixing tigervnc breakage #1394
* a lot of public api has been converted to private caused tigervnc to not even initialise. Start gradually fixing them.
1 parent 0ec0f00 commit 109b2a9

File tree

9 files changed

+15
-11
lines changed

9 files changed

+15
-11
lines changed

dix/callback_priv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define _XSERVER_CALLBACK_PRIV_H
77

88
#include "callback.h"
9+
#include <dix.h>
910

1011
void InitCallbackManager(void);
1112
void DeleteCallbackManager(void);

dix/display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include "dix/dix_priv.h"
88
#include "include/dix.h"
99
#include "include/screenint.h"
10+
#include <opaque.h>
1011

11-
const char *display = "0";
1212
int displayfd = -1;
1313

1414
const char *dixGetDisplayName(ScreenPtr *pScreen)

dix/dix_priv.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ extern int ScreenSaverBlanking;
292292
extern int ScreenSaverAllowExposures;
293293
extern int defaultScreenSaverBlanking;
294294
extern int defaultScreenSaverAllowExposures;
295-
extern const char *display;
296295
extern int displayfd;
297296
extern Bool explicit_display;
298297

dix/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ extern void Dispatch(void);
129129

130130
CallbackListPtr RootWindowFinalizeCallback = NULL;
131131
CallbackListPtr PostInitRootWindowCallback = NULL;
132-
132+
char *display = NULL;
133133
int
134134
dix_main(int argc, char *argv[], char *envp[])
135135
{
136136
HWEventQueueType alwaysCheckForInput[2];
137137

138-
display = "0";
138+
display = (char *)"0";
139139

140140
InitRegions();
141141

dix/selection_priv.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
#include "include/dixstruct.h"
1313
#include "include/privates.h"
1414

15-
typedef struct _Selection {
15+
struct _Selection {
1616
Atom selection;
1717
TimeStamp lastTimeChanged;
1818
Window window;
1919
WindowPtr pWin;
2020
ClientPtr client;
2121
struct _Selection *next;
2222
PrivateRec *devPrivates;
23-
} Selection;
23+
};
2424

2525
typedef enum {
2626
SelectionSetOwner,
@@ -56,9 +56,6 @@ typedef struct {
5656
Atom target;
5757
} SelectionFilterParamRec, *SelectionFilterParamPtr;
5858

59-
extern Selection *CurrentSelections;
60-
61-
extern CallbackListPtr SelectionCallback;
6259
extern CallbackListPtr SelectionFilterCallback;
6360

6461
int dixLookupSelection(Selection **result,

include/callback.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ SOFTWARE.
5151
#include <X11/Xdefs.h> /* for Bool */
5252
#include <X11/Xproto.h>
5353
#include <X11/Xfuncproto.h>
54-
5554
/*
5655
* callback manager stuff
5756
*/
5857

5958
typedef struct _CallbackList *CallbackListPtr;
59+
typedef struct _Selection Selection;
6060

6161
typedef void (*CallbackProcPtr) (CallbackListPtr *, void *, void *);
6262

@@ -79,4 +79,7 @@ CallCallbacks(CallbackListPtr *pcbl, void *call_data)
7979
_CallCallbacks(pcbl, call_data);
8080
}
8181

82+
extern _X_EXPORT CallbackListPtr SelectionCallback;
83+
extern _X_EXPORT Selection *CurrentSelections;
84+
8285
#endif /* CALLBACK_H */

include/opaque.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@ from The Open Group.
3737
extern _X_EXPORT Bool enableIndirectGLX;
3838
extern _X_EXPORT Bool bgNoneRoot;
3939

40+
extern _X_EXPORT char *display;
41+
4042
#endif /* OPAQUE_H */

os/connection.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ SOFTWARE.
105105
#include "globals.h"
106106
#include "xace.h"
107107

108+
#include <opaque.h>
109+
108110
#ifdef HAVE_GETPEERUCRED
109111
#include <ucred.h>
110112
#include <zone.h>

os/xdmcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#include "dixstruct.h"
4848

4949
#include "os/Xtrans.h"
50-
50+
#include <opaque.h>
5151
#ifdef XDMCP
5252
#undef REQUEST
5353

0 commit comments

Comments
 (0)