Skip to content

Commit

Permalink
Merge pull request #602 from a740g/macos-fixes
Browse files Browse the repository at this point in the history
Disables mouse event suppression on macOS when the mouse is hidden and moved
  • Loading branch information
a740g authored Jan 25, 2025
2 parents 047d41a + 96bc7e4 commit cae4a85
Show file tree
Hide file tree
Showing 7 changed files with 217 additions and 183 deletions.
5 changes: 2 additions & 3 deletions internal/c/libqb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28826,9 +28826,8 @@ int main(int argc, char *argv[]) {
singlespace = qbs_new_cmem(1, 0);
singlespace->chr[0] = 32;

// store _CWD$ for recall using _STARTDIR$ in g_startDir
g_startDir = qbs_new(0, 0);
qbs_set(g_startDir, func__cwd());
// Store _CWD$ for recall using _STARTDIR$
FS_SaveStartDirectory();

// switch to directory of this EXE file
// http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe
Expand Down
4 changes: 1 addition & 3 deletions internal/c/libqb/include/filesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

struct qbs;

/// @brief This is a global variable that is set on startup and holds the directory that was current when the program was loaded
extern qbs *g_startDir;

void FS_SaveStartDirectory();
bool FS_DirectoryExists(const char *path);
bool FS_FileExists(const char *path);

Expand Down
5 changes: 5 additions & 0 deletions internal/c/libqb/include/mac-mouse-support.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
void macMouseInit();
void macMouseDone();
void macMouseUpdatePosition(int x, int y);
void macMouseAssociateMouseAndMouseCursorPosition(bool connected);
#else
static inline void macMouseInit() {}

Expand All @@ -13,4 +14,8 @@ static inline void macMouseUpdatePosition(int x, int y) {
(void)x;
(void)y;
}

static inline void macMouseAssociateMouseAndMouseCursorPosition(bool connected) {
(void)connected;
}
#endif
Loading

0 comments on commit cae4a85

Please sign in to comment.