File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 4
4
5
5
static Display * mainDisplay = NULL ;
6
6
static int registered = 0 ;
7
- static char * display_name = ":0.0" ;
8
- static int display_name_changed = 0 ;
7
+ static char * displayName = ":0.0" ;
8
+ static int hasDisplayNameChanged = 0 ;
9
9
10
10
Display * XGetMainDisplay (void )
11
11
{
12
- /* Close the display if display_name has changed */
13
- if (display_name_changed ) {
12
+ /* Close the display if displayName has changed */
13
+ if (hasDisplayNameChanged ) {
14
14
XCloseMainDisplay ();
15
+ hasDisplayNameChanged = 0 ;
15
16
}
16
- display_name_changed = 0 ;
17
17
18
18
if (mainDisplay == NULL ) {
19
- /* First try the user set display_name */
20
- mainDisplay = XOpenDisplay (display_name );
19
+ /* First try the user set displayName */
20
+ mainDisplay = XOpenDisplay (displayName );
21
21
22
22
/* Then try using environment variable DISPLAY */
23
23
if (mainDisplay == NULL ) {
@@ -45,10 +45,10 @@ void XCloseMainDisplay(void)
45
45
46
46
char * getXDisplay (void )
47
47
{
48
- return display_name ;
48
+ return displayName ;
49
49
}
50
50
51
51
void setXDisplay (char * name ) {
52
- display_name = name ;
53
- display_name_changed = 1 ;
52
+ displayName = name ;
53
+ hasDisplayNameChanged = 1 ;
54
54
}
You can’t perform that action at this time.
0 commit comments