topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday November 4, 2024, 12:29 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: IDEA: drag window to edge automatically resizes it  (Read 775053 times)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #500 on: November 11, 2008, 04:34 PM »
:D
Thank you DrIce!
Its this kind of messages that really motivate the work we all do for the community!

Good luck for your job search ;)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #501 on: December 03, 2008, 11:13 AM »
GridMove was updated just now ;)

- Tried to fix this
- Removed the duplicate grids from the templates menu
- Now doesn't interfeer with Office2007 (or any other "strange" window).
- "undo" button (formerly known as "restore") is now in the 2-part and 3-part grid also.
- A few code updates

There may be some problems with stuff from previous versions still in the config options. If you get any problem, try moving GridMove.ini to another folder and start GridMove again to see if problems still are there.

Let's hear your opinions ;)

tmuka

  • Participant
  • Joined in 2008
  • *
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #502 on: December 04, 2008, 08:20 AM »
Just noticed my gridmove was a few versions old.  I am really happy after the update Gridmove plays well with Adobe CS4 suite that uses Adobe Air!  Thanks for the great work!!!

major_lag

  • Participant
  • Joined in 2008
  • *
  • Posts: 1
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #503 on: December 05, 2008, 05:27 PM »
Hey ppass.

About the suggestions regarding fastmove:
Currently, none of those are possible, simply because gridmove isn't aware of where the window is. I mean, it only moves the window to a grid, and doesn't keep track of which windows are in which grids. It's not impossible to implement your suggestions, only something i can't do right now.

About having the windows move to the other screen... You can make your own gird, which could have for example in monitor 1, an element that would move the window to monitor 2, and in mornitor 2 would have an element that would move to monitor 1.

ps: I have attached to this post, another version of axcrusik's grid, which allows you to, in conjuntion with being able to move windows with the numpad, move them in a way that makes more sense.
To install it, just add it to the "grids" folder of gridmove, and replace the earlier version.

Another interesting feature is that now you can add a modifier to reach for numbers higher than 10 faster. Check on the ini file, and set the key FastMoveMeta like this:
FastMoveMeta=\
That will allow you to move a window to area 11 by pressing win+\ followed by 1 (instead of 11 like when you press win+g).

I would like to throw my vote in with ppass; I would appreciate a mechanism to migrate a window from one grid space to an adjacent one using a single key combination, and the ability to repeat that same motion to achieve a desired location further along.  Identifying the grid space currently occupied by a window I don't think is too rigorous a task.  I'll man up and throw down some pseudocode:

; given W as window, D as direction pushed (1-8)
nearestDistance := MAX_INT ; or some arbitrary large number
nearestGroup := 0
maximumDistance := 50 ; this would be set through the UI
minimumDistance := 4 ; for rounding errors, perhaps?
for each G in Groups
  distance := abs(G.left - W.left) + abs(G.right - W.right) + abs(G.top - W.top) + abs(G.bottom - W.bottom)
  if distance < nearestDistance
    nearestDistance := distance
    nearestGroup := G
    if nearestDistance < minimumDistance
      ; this is most likely it; quit looking.
      break
    end if
  end if
end for
if nearestDistance < maximumDistance
  ; this window is 'close enough' to nearestGrid; move from there
  Move(W, NextGrid(nearestGrid, D))
else
  ; this window is too far from nearestGrid; move to there
  Move(W, nearestGrid)
end if

The minimum distance keeps it from searching if we've found the right window (or the window which invariably will be the one selected).  The maximum distance allows for windows which don't resize well (like cmd.exe) to still be considered 'in' a grid area.

you could add a single element (GridNext) to the grid file relating directions moved to grid segments, like so:

[1]
  TriggerTop    = [Monitor1Top]  + [Monitor1Height] /3 *2
  TriggerRight  = [Monitor1Left] + [Monitor1Width]  /3
  TriggerBottom = [Monitor1Bottom]
  TriggerLeft   = [Monitor1Left]
  GridTop       = [Monitor1Top]  + [Monitor1Height] /3 *2
  GridRight     = [Monitor1Left] + [Monitor1Width]  /3
  GridBottom    = [Monitor1Bottom]
  GridLeft      = [Monitor1Left]
  GridNext      = 2,5,4,1,1,1,1,1

Which would represent the next grid segment in a cardinal direction (numbered from right, incrementing as we move counter-clockwise) so if the grid network were arranged as a number pad this would be a suitable entry for the '1' key region, moving to 2 on a right direction, 5 on up-right, and 4 on up.

Anyway, I realize that we are all busy.  No rush or anything, but I'd be extra-ordinarily grateful for this addition.

Thanks!

ebennetthill

  • Supporting Member
  • Joined in 2008
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #504 on: December 07, 2008, 07:26 PM »
I'm having two problems with 1.19.57.

One, I did have to do the trick of turning off "advanced text services for this program" just to get it to work. I didn't have that problem with 1.19.53. I was a little panicky for a while. But the grids did work after I found that trick on the forums.

The other problem has to do with "TitleSize" and "TitleLeft". I had TitleLeft set at 150 and TitleSize set at 355 which gave me a comfortable range to grab the title bar. With 1.19.57 I'm not sure what was going on, but it shrank the left mouse grab area to just a few pixels. It seemed to be okay with the default settings, but as I increased the TitleSize, things started acting weird.

But I fixed it while messing around with the AHK version. I changed the line "if(WinWidth > 3 * TitleSize)" to "if(WinWidth > 2 * TitleSize)" and things work as they used to for me. I don't understand it. It was a fortunate guess for me.

I like the outlined trigger areas. That visualization is helpful.

Thanks,
Ben

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #505 on: December 07, 2008, 08:00 PM »
Hi ben!

As for the "advanced text services" thing, I have no idea what causes that, but since I haven't changed much stuff since .53, I suppose it was the recompilation that caused that problem.

As for the second problem, I added that in this version but didn't predict people might use gridmove with such values (that positions the area in the middle of the titlebar, right?) and that test makes sure that the area isn't taking the whole titlebar (for small windows). Actually, in your case, you never experience that problem, since the are which you can grab the window to move it (without gridmove) is on the left. Smart :P

ebennetthill

  • Supporting Member
  • Joined in 2008
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #506 on: December 07, 2008, 09:00 PM »
Thanks for the quick reply. I'm still playing with the new version. I think I still like the way the old version handled the titleleft/titlesize. The 150-355 setting gave the left side of most of my windows to grab and resize, and the right side to grab and move. There was a problem with small windows sometimes because the title extended too far across the window, but not too often. I think I might need to change more than the 3* to 2* to get it to behave like it used to.

Also, what do I change to get GridMove to handle microsoft windows the same as the old version? GridMove is not recognizing them at all now - no matter what size they are or where I click them. I'm a HS teacher and I usually have a Word document or two or three open and an Excel file too. Resizing them with GridMove was a main use of the program for me.

By the way, just as a matter of fact, I'm using GridMove on a Thinkpad Tablet with a 12" screen (pretty small).

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #507 on: December 08, 2008, 03:17 AM »
:)
To be fair, you did a better decision than mine. Since you put that area on the right, you don't have the problem most people have with gridmove, which is that it interfeers with clicking on the office 2007 buttons. To protect people from that, I added a detection of those cases, to disabled GridMove for those windows.
You can remove that by removing the "AND MouseControl = """ clause on this code:

code inside
  if(WinWidth > 3 * TitleSize)
  {
    If (TitleSize < WinWidth - 100 AND LButtonDrag
        AND OldmouseX > TitleLeft AND OldMouseX < TitleSize
  AND MouseControl = "")
    {
      Hotkey = LButton
      sendinput {LButton up}
      GoSub,DropZoneMode
      Settimer, MousePosition,10
      return
    }
  }
  else
  {
    If (LButtonDrag AND OldmouseX > TitleLeft
        AND OldMouseX < TitleLeft + 20 AND WinWidth > 170
        AND MouseControl = "")
    {
      Hotkey = LButton
      sendinput {LButton up}
      GoSub,DropZoneMode
      Settimer, MousePosition,10
      return
    }
  }


nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #508 on: December 24, 2008, 07:19 AM »
idea: 'throw' windows across screen to activate gridmove resizing.

(assuming this hasn't been suggested already) click and hold the windows titlebar and 'throw' it in the direction of the zone on the grid that you want to use.

so the direction of the throw determines the resize and final window position.

could work well i think for simple grid layouts.

would autohotkey be able to detect 'throws', i.e. click, hold, move mouse quickly and release hold.

(sorry if i've already said this idea before or just repeated someone else's post - it seems kind of familiar.)

mojo-chan

  • Guest
Re: IDEA: drag window to edge automatically resizes it
« Reply #509 on: January 01, 2009, 07:05 PM »
I found a bug :)

When you make a window "on top", it does stay on top at first. However, when certain things happen to it, it looses the "on top" attribute.

A good example is the KeePass 2.06 window. You can make it stay on top, but if you then add an entry when the new entry window closes the main window is no longer stuck on top.

ATI Hydravision and nView seem to work okay...

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #510 on: January 01, 2009, 07:32 PM »
Hi mojo-chan!
I really don't know why that happens, never happened to me.
I just tried it, but couldn't reproduce (probably because i only have keepass 1.11  :-[).
Have you seen this happen with any other program?

Nudone: I still haven't answered because I really like your idea, I'm trying to find some time to make something out of it ;)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #511 on: January 02, 2009, 03:28 AM »
i know i how busy you are, jgpaiva, so i was only hoping that you might consider the idea one day. i'm pleased you like the idea - if it gets implemented then that would be fantastic - whenever that may be.

mojo-chan

  • Guest
Re: IDEA: drag window to edge automatically resizes it
« Reply #512 on: January 02, 2009, 07:18 AM »
Hi mojo-chan!
I really don't know why that happens, never happened to me.
I just tried it, but couldn't reproduce (probably because i only have keepass 1.11  :-[).
Have you seen this happen with any other program?

I have not seen it happen with other programs so far, it looks like it's just KeePass 2.06... I am going to contact the developers of KeePass about it, because having thought about it, it's probably a bug in KeePass where it is re-setting the window parameters.

kwacky1

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 182
  • i am Cody's cousin
    • View Profile
    • CrazyLittleWebsite
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #513 on: January 02, 2009, 07:20 AM »
I found a bug :)

When you make a window "on top", it does stay on top at first. However, when certain things happen to it, it looses the "on top" attribute.

It's not really a bug, it's just the window you're interacting with contains it's own code to reset the ontop flag when the gui gets redrawn for whatever reason.

I can replicate this quite easily with remote desktop (mstsc) session window
  • log into a remote computer with mstsc
  • position window, set ontop attribute
  • click on remote desktop window, click on other window, watch remote desktop window sink to the bottom

the only solution, i feel, would be to continuously check 'ontop' windows and reset if required.

mojo-chan

  • Guest
Re: IDEA: drag window to edge automatically resizes it
« Reply #514 on: January 02, 2009, 07:27 AM »
I have submitted a bug for it on the KeePass tracker. Rather than just resetting the "on top" attribute it should either just leave it alone or query it.

My guess is that it turns off the attribute when you open the Add Item window, because otherwise it would cover that window.

Anyway, thanks for gridmove. I was originally using nView, then switched to Hydravision but it was rubbish. Can I make one more little request? In nView it put a an extra item on the window menu that you get when clicking on a window's icon in the top left to toggle it between on top and normal. That was really handy.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #515 on: January 02, 2009, 07:41 AM »
kwacky1: I think that constantly setting windows to be ontop would potentially take too much processor time, and only help a few programs.

mojo-chan: I did try to add stuff to the window menu (or the window title, next to the other 3 buttons), but have found there's no reliable way to do it with Autohotkey, the language GridMove is built with.

kwacky1

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 182
  • i am Cody's cousin
    • View Profile
    • CrazyLittleWebsite
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #516 on: January 02, 2009, 07:55 AM »
kwacky1: I think that constantly setting windows to be ontop would potentially take too much processor time, and only help a few programs.

jgpaiva, my thoughts exactly, not worth it.  I think mojo-chan has taken the right angle, poorly written software should be punished.   ;D

mojo-chan

  • Guest
Re: IDEA: drag window to edge automatically resizes it
« Reply #517 on: January 02, 2009, 11:21 AM »
mojo-chan: I did try to add stuff to the window menu (or the window title, next to the other 3 buttons), but have found there's no reliable way to do it with Autohotkey, the language GridMove is built with.

Okay, fair enough. It's not a big deal. I just really like the way nView works - on top on the window menu and hold down control while dragging to select part of the layout.

Kibblesnbits

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #518 on: January 07, 2009, 10:27 AM »
I absolutely love this program - it's a necessity when you're working with 3+ monitors. There is one feature that I'd love, and I may have missed it somewhere if it already exists - to have an "ignore list" of programs. Several of the programs I use on a daily basis (AutoCAD, Civil3D, Photoshop, others) make use of middle-mouse for navigation, binds, and gestures. Having to manually set each one to be ignored is a little annoying.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #519 on: January 07, 2009, 11:03 AM »
Kibblesnbits: GridMove can ignore windows if you right-click its tray icon and select "ignore/unignore window). As this is saved across sessions, you should only have to do it once.. Is it not working for you?

Kibblesnbits

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #520 on: January 07, 2009, 12:02 PM »
Odd - it works for Photoshop and most others, but not for a handful of programs (Google Sketchup is one immediate example). Sketchup was the one I was having to constantly add to the ignore list the most so I assumed GridMove had issues with others.

Example, Photoshop added to ignore list correctly - saves across sessions:


Example, Sketchup added to ignore list incorrectly:

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #521 on: January 07, 2009, 12:33 PM »
Oh.. Google sketchup changes its window class with each time you run it :(
Then I don't know of any way to identify that window, sorry..

Kibblesnbits

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #522 on: January 07, 2009, 12:51 PM »
Aww :(

try

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #523 on: January 11, 2009, 11:21 AM »
Hey,

What is the easiest way set it back so that it works right with Office 2007 windows again? I can't find my old .exe to re-install the earlier version, and I don't understand where to remove the code suggested above.

Thanks!

rex.withers

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #524 on: January 21, 2009, 05:05 PM »
I have the old version of gridmove but uninstalling and reinstalling again didn't seam to reactivate the office 2007 programs within grid move. Help! I feel like on arm has been cut off.

(Great program by the way)