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