Jumping windows?
Author |
Message |
Mackie
![](http://compsci.ca/v3/uploads/user_avatars/217548454cee912ae1202.png)
|
Posted: Sat Apr 26, 2008 11:37 pm Post subject: Jumping windows? |
|
|
I'm working on a window resizor, it's still pretty young, and it's not in it's final position or style, I figured I'd get the technique down first though. So, I've got a small glitch left, which seems to be pretty random, when my window is at certain positions on the screen it will jump around the screen to a completely insane, uncalled for location. Anyone know why this is happening?
Turing: | class Resizer
import Window
export Initialize, Run
var windowHeight, windowWidth : int2
var windowX, windowY : int
var width, height : nat1
var resize : boolean := false
procedure Initialize (width_, height_ : nat1)
width := width_
height := height_
windowHeight := maxy
windowWidth := maxx
end Initialize
procedure Run (mouseX, mouseY, mouseB : int2)
Draw.FillBox (maxx - width, maxy - height, maxx, maxy, white)
Draw.FillBox (maxx - width, maxy - height, maxx - (width div 5), maxy - (height div 5), black)
Draw.FillBox (maxx - width, maxy - height, maxx - (width div 3), maxy - (height div 3), white)
Draw.Box (maxx - width, maxy - height, maxx, maxy, black)
if mouseX >= maxx - width and mouseX <= maxx and
mouseY >= maxy - height and mouseY <= maxy and
mouseB = 1 then
resize := true
Window.GetPosition (- 1, windowX, windowY )
end if
if resize then
windowWidth := mouseX + width div 2
windowHeight := mouseY + height div 2
Window.Set (Window.GetSelect, "graphics:" + intstr (windowWidth ) + ";" + intstr (windowHeight ) +
",position:" + intstr (windowX ) + ";" + intstr (windowY ))
if mouseB = 0 then
resize := false
end if
end if
end Run
end Resizer
View.Set ("offscreenonly,position:center;center")
var mouseX, mouseY, mouseB : int
var sizor : ^Resizer
new sizor
sizor -> Initialize (20, 20)
loop
Mouse.Where (mouseX, mouseY, mouseB )
sizor -> Run (mouseX, mouseY, mouseB )
View.Update
Time.Delay (3)
Draw.Cls
end loop
|
Ignore any useless code, just messing around. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
gitoxa
![](http://compsci.ca/v3/uploads/user_avatars/125344263047f801d546bcb.jpg)
|
Posted: Sun Apr 27, 2008 2:48 pm Post subject: Re: Jumping windows? |
|
|
This is rather neat, but I do not see the problem, nor could I re-create what you described. |
|
|
|
|
![](images/spacer.gif) |
Mackie
![](http://compsci.ca/v3/uploads/user_avatars/217548454cee912ae1202.png)
|
Posted: Sun Apr 27, 2008 3:19 pm Post subject: RE:Jumping windows? |
|
|
I hear that form a lot of people as well.... I have a higher screen resolution than most people which could be a factor.
1680 * 1080
Could anyone else confirm this?
Also, try putting a corner off screen to see what happens. |
|
|
|
|
![](images/spacer.gif) |
Sean
![](http://compsci.ca/v3/uploads/user_avatars/47413941748406f441f83e.png)
|
Posted: Sun Apr 27, 2008 5:15 pm Post subject: RE:Jumping windows? |
|
|
No problem here Mackie, might be just you? |
|
|
|
|
![](images/spacer.gif) |
Nick
![](http://compsci.ca/v3/uploads/user_avatars/19644337547e837b41d67a.png)
|
Posted: Sun Apr 27, 2008 5:20 pm Post subject: RE:Jumping windows? |
|
|
I had the same problem Mackie, but I am running through Linux... |
|
|
|
|
![](images/spacer.gif) |
Sean
![](http://compsci.ca/v3/uploads/user_avatars/47413941748406f441f83e.png)
|
Posted: Sun Apr 27, 2008 5:31 pm Post subject: RE:Jumping windows? |
|
|
How many applications did you have running at once tho? |
|
|
|
|
![](images/spacer.gif) |
lordroba
![](http://compsci.ca/v3/uploads/user_avatars/59807821047352e408f0e3.jpg)
|
Posted: Sun Apr 27, 2008 8:43 pm Post subject: Re: Jumping windows? |
|
|
I know why it's happening, at least on my computer. I have my taskbar set on the left side of the screen instead of on the buttom. When I put it on the bottom though, the glitch is gone. I had the same problem with a window shaking program that I got off of here. I'm not sure why it does what it does, but if anyone can figure out how to fix the problem, i'd like to know. |
|
|
|
|
![](images/spacer.gif) |
Mackie
![](http://compsci.ca/v3/uploads/user_avatars/217548454cee912ae1202.png)
|
Posted: Sun Apr 27, 2008 10:01 pm Post subject: RE:Jumping windows? |
|
|
I'm currently running debugging stuff, I'll figure it out, It's my mission.... I have a lead.... Sort of? >.< if Anyone has an idea, even a stupid one, please speak up. If I figure it out now, someone else won't have to go through it in the future.
(Also working on reducing flashing) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tallguy
![](http://compsci.ca/v3/uploads/user_avatars/515706924539b443d32a6e.gif)
|
Posted: Mon Apr 28, 2008 7:59 am Post subject: RE:Jumping windows? |
|
|
it's not glitching for me, perhaps its just ur computer? |
|
|
|
|
![](images/spacer.gif) |
Sean
![](http://compsci.ca/v3/uploads/user_avatars/47413941748406f441f83e.png)
|
Posted: Mon Apr 28, 2008 4:06 pm Post subject: RE:Jumping windows? |
|
|
Glitched for me this time. Seems that when you drag it bounces everywhere. Any leads to as why yet Mackie? |
|
|
|
|
![](images/spacer.gif) |
Mackie
![](http://compsci.ca/v3/uploads/user_avatars/217548454cee912ae1202.png)
|
Posted: Mon Apr 28, 2008 5:12 pm Post subject: RE:Jumping windows? |
|
|
I think that it may be due to that fact that Turing wasn't build for larger resolutions, it seems to bounce with in a box, if you spend enough time looking at it, you'll sse it has a pattern. It's moving to a point where it thinks the edge of the screen is. Just a thought. |
|
|
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Mon Apr 28, 2008 5:29 pm Post subject: RE:Jumping windows? |
|
|
I know Delos did a Turing window shake module that was quite good a few years ago. You could try looking that up for reference / inspiration. |
|
|
|
|
![](images/spacer.gif) |
|
|