mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-29 21:43:55 +00:00
Upload miss code fixed CI
This commit is contained in:
parent
5d460e5100
commit
b439c59d85
@ -2,7 +2,7 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
MMBitmapRef createMMBitmap_c(uint8_t *buffer, size_t width, size_t height,
|
||||
MMBitmapRef createMMBitmap_c(uint8_t *buffer, int32_t width, int32_t height,
|
||||
size_t bytewidth, uint8_t bitsPerPixel, uint8_t bytesPerPixel
|
||||
) {
|
||||
MMBitmapRef bitmap = malloc(sizeof(MMBitmap));
|
||||
|
@ -8,6 +8,13 @@ static int registered = 0;
|
||||
static char *displayName = NULL;
|
||||
static int hasDisplayNameChanged = 0;
|
||||
|
||||
void XCloseMainDisplay(void) {
|
||||
if (mainDisplay != NULL) {
|
||||
XCloseDisplay(mainDisplay);
|
||||
mainDisplay = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Display *XGetMainDisplay(void) {
|
||||
/* Close the display if displayName has changed */
|
||||
if (hasDisplayNameChanged) {
|
||||
@ -40,13 +47,6 @@ Display *XGetMainDisplay(void) {
|
||||
return mainDisplay;
|
||||
}
|
||||
|
||||
void XCloseMainDisplay(void) {
|
||||
if (mainDisplay != NULL) {
|
||||
XCloseDisplay(mainDisplay);
|
||||
mainDisplay = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void setXDisplay(char *name) {
|
||||
displayName = strdup(name);
|
||||
hasDisplayNameChanged = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user