Skip to content

Commit

Permalink
fix screen scale related bug
Browse files Browse the repository at this point in the history
  • Loading branch information
WangLeto committed Jan 13, 2019
1 parent ecd83c2 commit cfe172b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions SetBrightness/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.6.2.0")]
[assembly: AssemblyFileVersion("2.6.2.0")]
[assembly: AssemblyVersion("2.6.3.0")]
[assembly: AssemblyFileVersion("2.6.3.0")]
8 changes: 3 additions & 5 deletions SetBrightness/TabForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ public TabForm()
private void _mouseHook_MouseLDown(MouseHook.Msllhookstruct mouseStruct, out bool goOn)
{
goOn = true;

var point = mouseStruct.pt;
if (!Visible || Bounds.Contains(new Point(point.x, point.y)))

if (!Visible || Bounds.Contains(Cursor.Position))
{
return;
}
Expand All @@ -79,8 +78,7 @@ private void _mouseHook_MouseLDown(MouseHook.Msllhookstruct mouseStruct, out boo

private void _mouseHook_MouseRDown(MouseHook.Msllhookstruct mouseStruct, out bool goOn)
{
var point = mouseStruct.pt;
if (!Visible || !tabControl.SelectedTab.Bounds.Contains(PointToClient(new Point(point.x, point.y))))
if (!Visible || !tabControl.SelectedTab.Bounds.Contains(PointToClient(Cursor.Position)))
{
goOn = true;
return;
Expand Down

0 comments on commit cfe172b

Please sign in to comment.