Skip to content

Commit

Permalink
koekeishiya#506 mouse action move should now work properly across dis…
Browse files Browse the repository at this point in the history
…plays
  • Loading branch information
koekeishiya authored and unrevre committed May 9, 2020
1 parent 849e324 commit 1364885
Show file tree
Hide file tree
Showing 4 changed files with 2,643 additions and 2,628 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Changed
- Update scripting addition for macOS 10.15.5 Beta (19F72f) [#501](https://github.com/koekeishiya/yabai/issues/501)
- Allow calling `space --label` without an argument to intentionally remove a previously assigned label [#514](https://github.com/koekeishiya/yabai/issues/514)
- Fixed an issue where a window moved across displays using *mouse action move* would be invisible [#506](https://github.com/koekeishiya/yabai/issues/506)

## [3.0.0] - 2020-05-01
### Removed
Expand Down
2 changes: 1 addition & 1 deletion src/osax/common.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef SA_COMMON_H
#define SA_COMMON_H

#define OSAX_VERSION "1.0.11"
#define OSAX_VERSION "1.0.12"

#define OSAX_PAYLOAD_SUCCESS 0
#define OSAX_PAYLOAD_NOT_FOUND 1
Expand Down
5 changes: 5 additions & 0 deletions src/osax/payload.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
extern CGError CGSSetWindowListAlpha(int cid, const uint32_t *window_list, int window_count, float alpha, float duration);
extern CGError CGSSetWindowLevel(int cid, uint32_t wid, int level);
extern OSStatus CGSMoveWindow(const int cid, const uint32_t wid, CGPoint *point);
extern CGError CGSReassociateWindowsSpacesByGeometry(int cid, CFArrayRef window_list);
extern CGError CGSGetWindowOwner(int cid, uint32_t wid, int *window_cid);
extern CGError CGSInvalidateWindowShadow(int cid, CGWindowID wid);
extern CGError CGSSetWindowTags(int cid, uint32_t wid, const int tags[2], size_t maxTagSize);
Expand Down Expand Up @@ -723,6 +724,10 @@ static void do_window_move(const char *message)
int y = token_to_int(y_token);
CGPoint point = CGPointMake(x, y);
CGSMoveWindow(_connection, wid, &point);

NSArray *window_list = @[ @(wid) ];
CGSReassociateWindowsSpacesByGeometry(_connection, (__bridge CFArrayRef) window_list);
[window_list release];
}

static void do_window_alpha(const char *message)
Expand Down
Loading

0 comments on commit 1364885

Please sign in to comment.