mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-06 00:13:33 +00:00
Fixed privacy bar movement limitation.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
// This file is auto-generated, any edits may be overwritten
|
||||
#define SOURCE_COMMIT_DATE "2020-Oct-13 18:14:15-0700"
|
||||
#define SOURCE_COMMIT_HASH "78b65edc4e326bc239cf3fbac6b769bc207057ba"
|
||||
// This file is auto-generated, any edits may be overwritten
|
||||
#define SOURCE_COMMIT_DATE "2021-Jul-6 14:07:36-0700"
|
||||
#define SOURCE_COMMIT_HASH "1f5022ed166093f3781ce05814d4e1a5d6b3b625"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -124,31 +124,37 @@ function windows_notifybar_local(title)
|
||||
{
|
||||
case 4:
|
||||
flags = msg.lparam_raw.Deref(24, 4).toBuffer().readUInt32LE() | 0x0002; // Set SWP_NOMOVE
|
||||
if (msg.lparam_raw.Deref(8, 4).toBuffer().readInt32LE() < this._options.window.left ||
|
||||
(msg.lparam_raw.Deref(8, 4).toBuffer().readInt32LE() + this._options.window.width) >= this._options.window.right)
|
||||
{
|
||||
// Disallow this move, because it will go out of bounds of the current monitor
|
||||
msg.lparam_raw.Deref(24, 4).toBuffer().writeUInt32LE(flags);
|
||||
|
||||
// If the bar is too far left, adjust to left most position
|
||||
if (msg.lparam_raw.Deref(8, 4).toBuffer().readInt32LE() < this._options.window.left) {
|
||||
msg.lparam_raw.Deref(8, 4).toBuffer().writeInt32LE(this._options.window.left);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Allow the move, but only on the X-axis
|
||||
msg.lparam_raw.Deref(12, 4).toBuffer().writeInt32LE(this._options.window.y);
|
||||
|
||||
// If the bar is too far right, adjust to right most position
|
||||
if ((msg.lparam_raw.Deref(8, 4).toBuffer().readInt32LE() + this._options.window.width) >= this._options.window.right) {
|
||||
msg.lparam_raw.Deref(8, 4).toBuffer().writeInt32LE(this._options.window.right - this._options.window.width);
|
||||
}
|
||||
|
||||
// Lock the bar to the y axis
|
||||
msg.lparam_raw.Deref(12, 4).toBuffer().writeInt32LE(this._options.window.y);
|
||||
|
||||
break;
|
||||
case 8:
|
||||
flags = msg.lparam_raw.Deref(32, 4).toBuffer().readUInt32LE() | 0x0002 // Set SWP_NOMOVE
|
||||
if (msg.lparam_raw.Deref(16, 4).toBuffer().readInt32LE() < this._options.window.left ||
|
||||
(msg.lparam_raw.Deref(16, 4).toBuffer().readInt32LE() + this._options.window.width) >= this._options.window.right)
|
||||
{
|
||||
// Disallow this move, because it will go out of bounds of the current monitor
|
||||
msg.lparam_raw.Deref(32, 4).toBuffer().writeUInt32LE(flags);
|
||||
|
||||
// If the bar is too far left, adjust to left most position
|
||||
if (msg.lparam_raw.Deref(16, 4).toBuffer().readInt32LE() < this._options.window.left) {
|
||||
msg.lparam_raw.Deref(16, 4).toBuffer().writeInt32LE(this._options.window.left);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Allow the move, but only on the X-axis
|
||||
msg.lparam_raw.Deref(20, 4).toBuffer().writeInt32LE(this._options.window.y);
|
||||
|
||||
// If the bar is too far right, adjust to right most position
|
||||
if ((msg.lparam_raw.Deref(32, 4).toBuffer().readInt32LE() + this._options.window.width) >= this._options.window.right) {
|
||||
msg.lparam_raw.Deref(32, 4).toBuffer().writeInt32LE(this._options.window.right - this._options.window.width);
|
||||
}
|
||||
|
||||
// Lock the bar to the y axis
|
||||
msg.lparam_raw.Deref(20, 4).toBuffer().writeInt32LE(this._options.window.y);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user