File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55static Display * mainDisplay = NULL ;
66static 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 ;
99
1010Display * XGetMainDisplay (void )
1111{
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 ) {
1414 XCloseMainDisplay ();
15+ hasDisplayNameChanged = 0 ;
1516 }
16- display_name_changed = 0 ;
1717
1818 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 );
2121
2222 /* Then try using environment variable DISPLAY */
2323 if (mainDisplay == NULL ) {
@@ -45,10 +45,10 @@ void XCloseMainDisplay(void)
4545
4646char * getXDisplay (void )
4747{
48- return display_name ;
48+ return displayName ;
4949}
5050
5151void setXDisplay (char * name ) {
52- display_name = name ;
53- display_name_changed = 1 ;
52+ displayName = name ;
53+ hasDisplayNameChanged = 1 ;
5454}
You can’t perform that action at this time.
0 commit comments