Skip to content

Commit

Permalink
fixed issues regarding the dnd update
Browse files Browse the repository at this point in the history
  • Loading branch information
ColleagueRiley committed Jul 14, 2023
1 parent 202526f commit b397a38
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions RGFW.h
Original file line number Diff line number Diff line change
Expand Up @@ -2562,7 +2562,6 @@ bool performDragOperation(id self, SEL cmd, NSDraggingInfo* sender) {
siArray(Class) array = si_array_init((Class[]){class(objctype(NSURL))}, sizeof(*array), 1);
siArray(char*) droppedFiles = (siArray(char*))NSPasteboard_readObjectsForClasses(NSDraggingInfo_draggingPasteboard(sender), array, NULL);

RGFW_windows[i]->event.droppedFiles = malloc(si_array_len(droppedFiles) * sizeof(*droppedFiles));
RGFW_windows[i]->event.droppedFilesCount = si_array_len(droppedFiles);

si_array_free(array);
Expand Down Expand Up @@ -2604,7 +2603,6 @@ RGFW_window* RGFW_createWindowPointer(const char* name, int x, int y, int w, int
win->inFocus = 0;
win->hideMouse = 0;
win->event.type = 0;
win->event.droppedFiles = NULL;
win->event.droppedFilesCount = 0;
win->valid = 245;

Expand Down Expand Up @@ -2732,8 +2730,8 @@ unsigned int* RGFW_window_screenSize(RGFW_window* win){

int* RGFW_window_getGlobalMousePoint(RGFW_window* win) {
int RGFW_mousePoint[2];
` RGFW_mousePoint[0] = win->event.x;
` RGFW_mousePoint[1] = win->event.y;
RGFW_mousePoint[0] = win->event.x;
RGFW_mousePoint[1] = win->event.y;

return RGFW_mousePoint; /* the point is loaded during event checks */
}
Expand Down

0 comments on commit b397a38

Please sign in to comment.