[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 188743] snap/magnet windows when in the desktop grid
From:       Caio Marcelo de Oliveira Filho <cmarcelo () gmail ! com>
Date:       2009-10-03 21:47:28
Message-ID: 20091003214728.8B24622AE5 () immanuel ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=188743


Caio Marcelo de Oliveira Filho <cmarcelo@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cmarcelo@gmail.com




--- Comment #4 from Caio Marcelo de Oliveira Filho <cmarcelo gmail com>  2009-10-03 23:47:26 ---
This last patch is an attempt to solve the problem. The idea is to use the
existing Workspace::adjustClientPosition() function to do the snap to border
calculation. I think that's the right way to go, so we have snap code only in
one place.

Two considerations:

1) my approach was to create another function in EffectsHandler
(adjustedMoveWindow) instead of changing the behaviour of existing
EffectsHandler::moveWindow(). I'm not sure if that's something we want, or
moveWindow() should always use the adjusted.

2) One minor drawback is that since it uses the distance in pixels of the "real
windows", when in grid mode, the snapping distance ends up to be smaller. If
that's a problem, a possible solution would be make adjustedMoveWindow() take
parameters (or extract it's code into another function), and when calling from
desktopgrid, use those parameters. However, I'm not really sure if it's indeed
necessary.

I would be glad if someone could review my patch. I am also willing to change
(1) and (2) if you think it's a good idea.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic