shoes / shoes4

Shoes 4 : the next version of Shoes
Other
1.59k stars 194 forks source link

simple-move.rb isn't working correctly (at least on Linux) #59

Closed PragTob closed 12 years ago

PragTob commented 12 years ago

Hi everyone,

when looking through the code I just noticed that the simple-move.rb, which is marked as working, seems to be broken - at least on my machine. Broken in the sense that id doesn't do what I expect it to do, see the screenshot:

Simple Move Broken

I'm running Linux Mint Debian Edition, jruby 1.6.7 and swt gem version 0.13

Cheers to everyone, Tobi

jrgifford commented 12 years ago

http://i.imgur.com/Q2laZ.png

For me, it's broken in a different way. Ubuntu 12.04, jruby 1.6.7 and swt gem 0.13 as well.

(at least, I don't think its supposed to blur like that)

wasnotrice commented 12 years ago

@PragTob Here's a screenshot from OSX 10.7

@ashbb does samples/simple-move.rb work properly on Windows?

wasnotrice commented 12 years ago

@jrgifford @PragTob does button "Two" bounce? (it should)

PragTob commented 12 years ago

Yep it bounces (for my screen the one that is lower, the upper one just stays there like an old relic)

wasnotrice commented 12 years ago

@PragTob ok, so on Mint we need to figure out why the original button is not being removed.

jrgifford commented 12 years ago

Yes, button two bounces. The upper one that is shown above might be a completely different bug, but it was relevant.

wasnotrice commented 12 years ago

@jrgifford ok, and you said it is blurry (which I can kind of see in the screenshot, but I thought Linux was just taking bad screenshots :P ).

So do you mean that when it bounces it leaves a trail (as I see in the screenshot)? It should be a smooth move, with no traces of previous positions.

It also looks like the bottom of the button is getting cut off when it is low in the slot. That happened at first on OS X, but is now fixed on that platform.

jrgifford commented 12 years ago

Correct, it leaves a trail.I think this is different issue than what @PragTob is experiencing.

PragTob commented 12 years ago

Mine also totally leaves a trail.

ashbb commented 12 years ago

Watch this running on my Windows 7. Seems like @PragTob's screenshot.

PragTob commented 12 years ago

Yep @ashbb is totally right, that's absolutely what happens on my machine with LMDE.

wasnotrice commented 12 years ago

Ok, finally got back to a machine with Flash, so I could see the video. That's bad, both in terms of the original button two not disappearing, and the ugly bouncing trails. :(

On OS X, it looks fine. Looks like I need to set up some VMs for testing...

Out of curiosity, do you also get those trails with samples/simple-animate.rb?

ashbb commented 12 years ago

For now, simple-animate.rb is this running on my Windows 7.

PragTob commented 12 years ago

Mine looks pretty much like the one of @ashbb so yeah those are probably trails, I thought that they were intended though :o

PragTob commented 12 years ago

That it looks yet again the same got me thinking, maybe this isn't an OS problem but rather a JDK problem. I'm using OpenJDK or more explicitly what java -v says:

tobi@speedy ~ $ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-3)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

How about everyone else? Would be nice if you could post that information.

wasnotrice commented 12 years ago

@PragTob

I have OS X 10.7 with

huckle:shoes4 eric$ java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50d)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
wasnotrice commented 12 years ago

@PragTob @ashbb here's simple-move.rb on my machine OS X

wasnotrice commented 12 years ago

@PragTob @ashbb here's simple-animate.rb on my OS X machine. I think you are seeing this one closer to what I am seeing, but still, I think it's not working right on your platforms.

wasnotrice commented 12 years ago

Okay, folks. I have figured out the problem with the trails and the non-disappearing buttons. In the process, I have discovered another, perhaps bigger problem.

First, the solution. We were creating Composites with SWT::NO_BACKGROUND. On OS X, this works as if there is a transparent background. On Linux and Windows, Swt simply doesn't paint the background of the composite. It just leaves whatever was already there, which is just garbage (old imprints of buttons, etc). I could solve the "leaving traces" problem by using a background on the Composite (this I discovered by accident).

Now, the problem. We don't want a background on the Composite. The Composite works great as a container, but doesn't have a transparent background. Shells can be transparent, but it is a complete hack to use a shell on top of another shell (it doesn't respond well to moving the window). And couldn't figure out how to get a transparent shell with an opaque button on it.

So at the moment, it almost works when I use a Composite as the container and size it to match the button (as opposed to having a full-window container). But there is still some background showing (more on OS X than on Linux).

I have tested this experiment on OS X and Linux (ignore the wrong positioning for now, just focus on the motion), but can you please test it on your platforms to make sure it works more or less like this? Fetch from wasnotrice/shoes4 and use the move branch here.

Does anyone have an idea of how to work around the no-transparent-background issue?

ashbb commented 12 years ago

@wasnotrice

I have tested this experiment on OS X and Linux (ignore the wrong positioning for now, just focus on the motion), but can you please test it on your platforms to make sure it works more or less like this? Fetch from wasnotrice/shoes4 and use the move branch here.

Sorry, I'm late. Your branch wasnotrice/shoes4/tree/move works like this on my Windows 7. It works as well.

PragTob commented 12 years ago

Works as well as with your video on my machine. Sorry for the late reply, stress at the university.

So, shall I merge the changes?

PS: no idea about the background but it seems to be a rather grave issue :-/

PragTob commented 12 years ago

Hi everyone,

could you please be so kind and check this behaviour from current master on your OS? It looks better on my Linux machine although #78 hasn't been merged... :o

wasnotrice commented 12 years ago

@PragTob is this fixed for you?

jrgifford commented 12 years ago

@wasnotrice looks fixed for me. http://www.youtube.com/watch?v=QDw9MRSPkuk&feature=youtu.be

wasnotrice commented 12 years ago

@jrgifford great! Thanks for checking. Closing as fixed