Skip to content

Commit

Permalink
Add: export XClose main display function
Browse files Browse the repository at this point in the history
  • Loading branch information
vcaesar committed Sep 17, 2024
1 parent cb51e2a commit 3e5b10f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions robotgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,11 @@ func GetXDisplayName() string {
return gname
}

// CloseMainDisplay close the main X11 display
func CloseMainDisplay() {
C.close_main_display()
}

// Deprecated: use the ScaledF(),
//
// ScaleX get the primary display horizontal DPI scale factor, drop
Expand Down
8 changes: 8 additions & 0 deletions screen/goScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ char* get_XDisplay_name() {
#endif
}

void close_main_display() {
#if defined(USE_X11)
XCloseMainDisplay();
#else
//
#endif
}

uint32_t get_num_displays() {
#if defined(IS_MACOSX)
uint32_t count = 0;
Expand Down

0 comments on commit 3e5b10f

Please sign in to comment.