DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: GridMove Window Snap: Window Edges: Inherent margin?  (Read 14,597 times)

MBfromOK

  • Participant
  • Joined in 2019
  • *
  • Posts: 3
GridMove Window Snap: Window Edges: Inherent margin?
« on: February 12, 2019, 03:01 PM »
I am building my custom grid (will post soon) and am trying to resolve an issue where resized windows leave a gap I didn't program.

Using this code for my vertical window split:
Code
[2] ;Left Half

  TriggerTop    = [Monitor2Top] + 2 * ([Monitor2Height] / 12) + 5
  TriggerBottom = [Monitor2Top] + 3 * ([Monitor2Height] / 12) - 5
  TriggerLeft   = [Monitor2Left] + 10
  TriggerRight  = [Monitor2Left] + ([Monitor2Width]  / 24)
  GridTop       = [Monitor2Top]
  GridBottom    = [Monitor2Bottom]
  GridLeft      = [Monitor2Left]
  GridRight     = [Monitor2Left] + ([Monitor2Width]  / 2)
  
[3] ;Right Half

  TriggerTop    = [Monitor2Top] + 2 * ([Monitor2Height] / 12) + 5
  TriggerBottom = [Monitor2Top] + 3 * ([Monitor2Height] / 12) - 5
  TriggerLeft   = [Monitor2Left] + ([Monitor2Width]  / 24)
  TriggerRight  = [Monitor2Left] + ([Monitor2Width]  / 12) - 5
  GridTop       = [Monitor2Top]
  GridBottom    = [Monitor2Bottom]
  GridLeft      = [Monitor2Right] - ([Monitor2Width]  / 2)
  GridRight     = [Monitor2Right]

There is a 5 - 10 pixel margin on all edges of the resized the windows (on my 1920x1080 monitor).

I tried adding x pixels to the Grid options to remove it like this:
Code
  GridLeft      = [Monitor2Right] - ([Monitor2Width]  / 2) + 5

but when the window resizes it drops the size back to contain the margins.

I have had a glance through the settings and don't see anything that would seem to effect this... Help!

[Edit] This might just be a visual bug??? When I put my mouse against a monitor edge it shows the resize arrow cursor and if I click and drag it resizes the correct window.
Seems like the window is sized correctly but being underdrawn / scaled down some amount.[/Edit]

[Edit 2] This margin is missing when I use the built in Maximize parameter.[/Edit 2]
« Last Edit: February 12, 2019, 03:24 PM by MBfromOK »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: GridMove Window Snap: Window Edges: Inherent margin?
« Reply #1 on: February 12, 2019, 06:40 PM »
Let me guess: You're on Windows 10?
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)

MBfromOK

  • Participant
  • Joined in 2019
  • *
  • Posts: 3
Re: GridMove Window Snap: Window Edges: Inherent margin?
« Reply #2 on: February 15, 2019, 01:30 PM »
Yeah... Is that a thing?

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: GridMove Window Snap: Window Edges: Inherent margin?
« Reply #3 on: February 15, 2019, 06:35 PM »
Well, Windows 10 puts a default transparent shadow around any non-maximized window of ca. 5-10 pixels. That is most likely what you are seeing. You probably can't 'fix' it as it isn't broken, but designed that way.
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)

Original address: https://www.donationcoder.com/forum/index.php?topic=47171.0