Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » VE on linux ... no image of the controls ?!
VE on linux ... no image of the controls ?! [message #81270] Tue, 22 February 2005 15:58 Go to next message
Eclipse UserFriend
Originally posted by: no.mail.please

Hi !

I just installed VE 1.0.2 on my MDK 10.1, with eclipse 3.0.1, gef 3.0.1,
emf 3.0.1.

If I create a new Visual file, I get the palette and other stuff, but
when I create a SWT Shell it just draw nothing : I mean I get the
handlers arround a blank area, no figure is drawn in the editor (or a
figure is drawn, but it has no capture of the "real" shell).

And I get the "real" shell painting on top of the eclipse window, so
it's not really beautiful (I can minimize it of course, but I thought
you would have put it offscreen).

If I drop new controls in the editor, they appear in the real shell, but
are not painted in the editor itself, althought I can select them if I
click on their location in the editor.

Is it a bug ? Or is there a problem with my config ?

TIA

--
Arnaud
Re: VE on linux ... no image of the controls ?! [message #81318 is a reply to message #81270] Tue, 22 February 2005 16:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

We try to put the real image off-screen, but some screen managers in
Linux don't allow this and they shove right back onto the viewable area.

Are there any errors in the log file? What exact version of Linux do you
have? This is GTK, right?

--
Thanks,
Rich Kulp
Re: VE on linux ... no image of the controls ?! [message #81360 is a reply to message #81318] Tue, 22 February 2005 17:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: no.mail.please

GTK indeed.
Linux version is 2.6.8 (mdk build).
I'll check errors in the log file tomorrow (I'm not at home right now).

--
Arnaud


Rich Kulp a écrit :
> We try to put the real image off-screen, but some screen managers in
> Linux don't allow this and they shove right back onto the viewable area.
>
> Are there any errors in the log file? What exact version of Linux do you
> have? This is GTK, right?
>
Re: VE on linux ... no image of the controls ?! [message #81399 is a reply to message #81270] Tue, 22 February 2005 20:36 Go to previous messageGo to next message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Arnaud wrote:
> Hi !
> Is it a bug ? Or is there a problem with my config ?

I'm running on Fedora Core 3 under Gnome with no problems and even
reasonably snappy performance. If you're still having trouble, please
provide your Linux distro, window manager, and desktop environment.

Regards,

Dave Orme
--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
Re: VE on linux ... no image of the controls ?! [message #81456 is a reply to message #81399] Wed, 23 February 2005 08:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: no.mail.please

OK, I get it work on another linux computer, with the same distro (MDK
10.1, linux 2.6.8 mdk build, KDE 3.2). Don't know why it doesn't work
correctly on my first computer, but I think I've been changing eclipse
configuration so many times on this one, that I should have lost
something ...

Anyway, on a good clean config, it works perfectly.

Not so perfectly actually. It appears that widget capture looks really
hugly : gradient of the title is not the same as real shell for example,
min/max/close buttons are just squares with icons in it, window icon
doesn't appear at the top left corner, window border looks just like a
fake of the real one ... Even controls don't look like the real ones.

Is it another bug from my config or is it the usual appearance on Linux
platform (cause win 32 looks great, I tested it) ?

I went a bit further in my investigation and isolated the code that
makes the capture : getImage(control, includeChildren) from ImageCapture
in o.e.v.i.swt.targetvm.unix, isn't it ? I used this code and the
swt-gtk-print.so library in a simple code to take a snapshot of a shell
and I get the same result as in VE.

If it is the "normal" behaviour, couldn't you consider use an external
tool as xwd to make a best capture ? I tried but I get a problem : the
handle returned by control.handle doesn't appear to be a valid handle
cause xwd can't reconize it. It's surprising cause I used the handle on
win32 platform to call WM_PRINT from a python tool and manage to get a
valid capture of the control. Any ideas ?

--
Arnaud
Re: VE on linux ... no image of the controls ?! [message #81528 is a reply to message #81456] Wed, 23 February 2005 14:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

The problem is that unless we physically make it entirely visible on the
screen we can't get a capture of the frame controls. Those are added
outside of the paint mechanism in GTK. WM_PRINT only works on Windows
for getting a screenshot. It doesn't work on GTK. We had to put in C
code that actually did a paint to an image, and that paint doesn't do
the frame controls. So we have to emulate the frame controls.

--
Thanks,
Rich Kulp
Re: VE on linux ... no image of the controls ?! [message #81553 is a reply to message #81528] Wed, 23 February 2005 17:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: no.mail.please

And what about the xwd option ?

It should work out-of-the-box if I could provide it a valid handle.
Unfortunatly, as I said before, the handle returned by control.handle (I
talk about SWT of course) does return a valid number for win32 platform
but doesn't seem to provide the good widget number for X, so xwd return
an error.

There is another xwd option which is to pass as argument the name of the
control, but I can't figure how to get it from eclipse.
Any idea ?

--
Arnaud
Re: VE on linux ... no image of the controls ?! [message #81568 is a reply to message #81553] Wed, 23 February 2005 17:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You're out of my league now. :-) I wasn't the one who wrote the code to
get the image on GTK. There was no way he could find to get an image of
the frame controls in installation independent way (i.e. it works on
Redhat Linux, SUSE, etc.).

Arnaud wrote:
> And what about the xwd option ?
>
> It should work out-of-the-box if I could provide it a valid handle.
> Unfortunatly, as I said before, the handle returned by control.handle (I
> talk about SWT of course) does return a valid number for win32 platform
> but doesn't seem to provide the good widget number for X, so xwd return
> an error.
>
> There is another xwd option which is to pass as argument the name of the
> control, but I can't figure how to get it from eclipse.
> Any idea ?
>
> --
> Arnaud

--
Thanks,
Rich Kulp
Re: VE on linux ... no image of the controls ?! [message #81596 is a reply to message #81568] Thu, 24 February 2005 09:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: no.mail.please

OK, you're right. Was just a suggestion.

I'll try to get it work and post a new bugzilla if needed (I think that
could help VE to have a nice capture on Linux platform and xwd can be
considered as an installation independant way, cause it is shipped with
all or almost all the distros that have a X server - the c program could
anyway simply test if xwd is installed or not and get the capture by two
different ways).

Thanks for answers.

--
Arnaud

Rich Kulp a écrit :
> You're out of my league now. :-) I wasn't the one who wrote the code to
> get the image on GTK. There was no way he could find to get an image of
> the frame controls in installation independent way (i.e. it works on
> Redhat Linux, SUSE, etc.).
>
> Arnaud wrote:
>
>> And what about the xwd option ?
>>
>> It should work out-of-the-box if I could provide it a valid handle.
>> Unfortunatly, as I said before, the handle returned by control.handle
>> (I talk about SWT of course) does return a valid number for win32
>> platform but doesn't seem to provide the good widget number for X, so
>> xwd return an error.
>>
>> There is another xwd option which is to pass as argument the name of
>> the control, but I can't figure how to get it from eclipse.
>> Any idea ?
>>
>> --
>> Arnaud
>
>
Re: VE on linux ... no image of the controls ?! [message #81626 is a reply to message #81596] Thu, 24 February 2005 14:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: myersj.gmail.com

Arnaud,

We looked at xwd, but it only works when the window being captured is on
screen and visible (to the front). We try to make the target vm window
as inconspicuous as possible (to varying degrees of success) - so
flashing it on screen every time we need to do a capture would be ugly.
We were considering launching a Xvfb X server and putting the remote
vm windows there... in that case since it's all virtual we could bring
the windows to the front and use xwd to do the capture. But that
approach has its own complications...

Any other ideas of how to improve the capture process are very welcome.
We're hardly experts in this area.

Thanks,

- Jeff

Arnaud wrote:
> OK, you're right. Was just a suggestion.
>
> I'll try to get it work and post a new bugzilla if needed (I think that
> could help VE to have a nice capture on Linux platform and xwd can be
> considered as an installation independant way, cause it is shipped with
> all or almost all the distros that have a X server - the c program could
> anyway simply test if xwd is installed or not and get the capture by two
> different ways).
>
> Thanks for answers.
>
> --
> Arnaud
Re: VE on linux ... no image of the controls ?! [message #81655 is a reply to message #81626] Thu, 24 February 2005 16:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: no.mail.please

Jeff Myers a écrit :
> Arnaud,
>
> We looked at xwd, but it only works when the window being captured is on
> screen and visible (to the front).

I thought xwd could capture offscreen windows (I've read it somewhere)
but didn't try it. I also thought to the X server ... (but was far from
knowing exactly how to do it). Too bad we can't manage to do it simply
on Linux. I'll keep an eye on it while finishing to make my program ...

SY

--
Arnaud
Re: VE on linux ... no image of the controls ?! [message #81681 is a reply to message #81456] Thu, 24 February 2005 16:25 Go to previous messageGo to next message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Arnaud wrote:
> Not so perfectly actually. It appears that widget capture looks really
> hugly : gradient of the title is not the same as real shell for example,
> min/max/close buttons are just squares with icons in it, window icon
> doesn't appear at the top left corner, window border looks just like a
> fake of the real one ... Even controls don't look like the real ones.

Yes, as Rich says, this is a platform limitation.

I'd make a design suggestion that you always edit a Composite. Then you
can embed that Composite in anything: a Shell, an Eclipse View or
Editor, a Dialog, whatever.

BTW, really nice code sluthing you've done there! Excellent work!


Best regards,

Dave Orme

--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
Re: VE on linux ... no image of the controls ?! [message #81696 is a reply to message #81655] Thu, 24 February 2005 16:34 Go to previous messageGo to next message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Arnaud wrote:
> Jeff Myers a écrit :
>
>> Arnaud,
>>
>> We looked at xwd, but it only works when the window being captured is
>> on screen and visible (to the front).
>
>
> I thought xwd could capture offscreen windows (I've read it somewhere)
> but didn't try it. I also thought to the X server ... (but was far from
> knowing exactly how to do it). Too bad we can't manage to do it simply
> on Linux. I'll keep an eye on it while finishing to make my program ...

I just had an idea: what if we used a VNC server to run an invisible
X-Windows session...?

With some work, this might even be made to work across all platforms so
we could have one code base on all platforms--even Mac.

The downside is that you'd always get some varient of X Windows widgets
(either GTK or Motif), even on non-X platforms, but it would work. With
GTK, this might not be so awful if you chose a theme that emulated the
look of the native widgets (Carbon/Cocoa/win32). And because you could
connect to the VNC server using a VNC client, you could debug the remote
VM interactively...

Thoughts, Rich? Jeff? Arnaud?


Regards,

Dave Orme

--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
Re: VE on linux ... no image of the controls ?! [message #81722 is a reply to message #81696] Fri, 25 February 2005 10:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: no.mail.please

David J. Orme a écrit :
> I just had an idea: what if we used a VNC server to run an invisible
> X-Windows session...?
>
> With some work, this might even be made to work across all platforms so
> we could have one code base on all platforms--even Mac.
>
> The downside is that you'd always get some varient of X Windows widgets
> (either GTK or Motif), even on non-X platforms, but it would work. With
> GTK, this might not be so awful if you chose a theme that emulated the
> look of the native widgets (Carbon/Cocoa/win32). And because you could
> connect to the VNC server using a VNC client, you could debug the remote
> VM interactively...
>
> Thoughts, Rich? Jeff? Arnaud?

Woawh ! Completly out of my competences (VNC server, ...). Sorry :(

But it seems really interesting.

--
Arnaud
Re: VE on linux ... no image of the controls ?! [message #81752 is a reply to message #81696] Fri, 25 February 2005 14:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: myersj.gmail.com

David J. Orme wrote:
>
>
> I just had an idea: what if we used a VNC server to run an invisible
> X-Windows session...?
>
> With some work, this might even be made to work across all platforms so
> we could have one code base on all platforms--even Mac.
>
> The downside is that you'd always get some varient of X Windows widgets
> (either GTK or Motif), even on non-X platforms, but it would work. With
> GTK, this might not be so awful if you chose a theme that emulated the
> look of the native widgets (Carbon/Cocoa/win32). And because you could
> connect to the VNC server using a VNC client, you could debug the remote
> VM interactively...
>
> Thoughts, Rich? Jeff? Arnaud?
>
>
> Regards,
>
> Dave Orme
>

My experience of using VNC server on Windows is it doesn't create a
separate session, just controls the active Windows user's desktop. So
it wouldn't have any benefit over the current approach. It looks like
the OS X VNC server has the same limitation (See
http://www.redstonesoftware.com/osxvnc/OSXvnc.html Q: Can I setup OSXvnc
to allow a remote user to work in his own desktop without disrupting the
user at the machine(like X-Windows)? ) As a X-Windows only solution, I
don't see much of a benefit that this would provide above using the Xvfb
solution.

- Jeff
Re: VE on linux ... no image of the controls ?! [message #81797 is a reply to message #81456] Fri, 25 February 2005 15:51 Go to previous messageGo to next message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hi Arnaud,
Could you please tell me which version of GTK/GTK+ you have on the
system which doesnt work?
Regards,
Sri.



Arnaud wrote:
> OK, I get it work on another linux computer, with the same distro (MDK
> 10.1, linux 2.6.8 mdk build, KDE 3.2). Don't know why it doesn't work
> correctly on my first computer, but I think I've been changing eclipse
> configuration so many times on this one, that I should have lost
> something ...
>
> Anyway, on a good clean config, it works perfectly.
>
> Not so perfectly actually. It appears that widget capture looks really
> hugly : gradient of the title is not the same as real shell for example,
> min/max/close buttons are just squares with icons in it, window icon
> doesn't appear at the top left corner, window border looks just like a
> fake of the real one ... Even controls don't look like the real ones.
>
> Is it another bug from my config or is it the usual appearance on Linux
> platform (cause win 32 looks great, I tested it) ?
>
> I went a bit further in my investigation and isolated the code that
> makes the capture : getImage(control, includeChildren) from ImageCapture
> in o.e.v.i.swt.targetvm.unix, isn't it ? I used this code and the
> swt-gtk-print.so library in a simple code to take a snapshot of a shell
> and I get the same result as in VE.
>
> If it is the "normal" behaviour, couldn't you consider use an external
> tool as xwd to make a best capture ? I tried but I get a problem : the
> handle returned by control.handle doesn't appear to be a valid handle
> cause xwd can't reconize it. It's surprising cause I used the handle on
> win32 platform to call WM_PRINT from a python tool and manage to get a
> valid capture of the control. Any ideas ?
>
> --
> Arnaud
Re: VE on linux ... no image of the controls ?! [message #81811 is a reply to message #81696] Fri, 25 February 2005 17:18 Go to previous messageGo to next message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hi Dave,
I am always a little leery of using any third-party implementation of X
windowing server/system other than the default prescribed for the system
(X11.org/X.org/XFree86.org), as there could be subtle differences, which
happen only in the third-party implementation of the X server, which
could be difficult to explain and fix. If there is a problem with the
default X server, it could be termed as a system limitation - something
which cannot be said of third-party implementations. Apart from that,
like Jeff mentioned there could be difference of opinion as to what
actually constitutes a display in third-party implementations.
Xvfb which is the headless X server implementation, is provided by all
the standard X windowing system manufacturers
(X11.org/X.org/XFree86.org) and would be a good candidate for what we
want to use it for - though there are some issues in general.
Regards,
Sri.



David J. Orme wrote:
> Arnaud wrote:
>
>> Jeff Myers a écrit :
>>
>>> Arnaud,
>>>
>>> We looked at xwd, but it only works when the window being captured is
>>> on screen and visible (to the front).
>>
>>
>>
>> I thought xwd could capture offscreen windows (I've read it somewhere)
>> but didn't try it. I also thought to the X server ... (but was far
>> from knowing exactly how to do it). Too bad we can't manage to do it
>> simply on Linux. I'll keep an eye on it while finishing to make my
>> program ...
>
>
> I just had an idea: what if we used a VNC server to run an invisible
> X-Windows session...?
>
> With some work, this might even be made to work across all platforms so
> we could have one code base on all platforms--even Mac.
>
> The downside is that you'd always get some varient of X Windows widgets
> (either GTK or Motif), even on non-X platforms, but it would work. With
> GTK, this might not be so awful if you chose a theme that emulated the
> look of the native widgets (Carbon/Cocoa/win32). And because you could
> connect to the VNC server using a VNC client, you could debug the remote
> VM interactively...
>
> Thoughts, Rich? Jeff? Arnaud?
>
>
> Regards,
>
> Dave Orme
>
Re: VE on linux ... no image of the controls ?! [message #81826 is a reply to message #81797] Fri, 25 February 2005 18:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: no.mail.please

I'll check it tomorrow.

SY

Arnaud

Sri Gunturi a écrit :
> Hi Arnaud,
> Could you please tell me which version of GTK/GTK+ you have on the
> system which doesnt work?
> Regards,
> Sri.
>
Re: VE on linux ... no image of the controls ?! [message #81855 is a reply to message #81826] Sun, 27 February 2005 17:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: no.mail.please

It's GTK+2.0, version 2.4.9-9mdk.

--
Arnaud
Re: VE on linux ... no image of the controls ?! [message #81869 is a reply to message #81811] Sun, 27 February 2005 19:57 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Sri Gunturi wrote:
> Xvfb which is the headless X server implementation, is provided by
> all the standard X windowing system manufacturers

Learn something every day... I wasn't aware of Xvfb. Thanks.


Dave
--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
Re: VE on linux ... no image of the controls ?! [message #605537 is a reply to message #81270] Tue, 22 February 2005 16:33 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

We try to put the real image off-screen, but some screen managers in
Linux don't allow this and they shove right back onto the viewable area.

Are there any errors in the log file? What exact version of Linux do you
have? This is GTK, right?

--
Thanks,
Rich Kulp
Re: VE on linux ... no image of the controls ?! [message #605545 is a reply to message #81318] Tue, 22 February 2005 17:13 Go to previous message
Arnaud is currently offline ArnaudFriend
Messages: 60
Registered: July 2009
Member
GTK indeed.
Linux version is 2.6.8 (mdk build).
I'll check errors in the log file tomorrow (I'm not at home right now).

--
Arnaud


Rich Kulp a écrit :
> We try to put the real image off-screen, but some screen managers in
> Linux don't allow this and they shove right back onto the viewable area.
>
> Are there any errors in the log file? What exact version of Linux do you
> have? This is GTK, right?
>
Re: VE on linux ... no image of the controls ?! [message #605552 is a reply to message #81270] Tue, 22 February 2005 20:36 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Arnaud wrote:
> Hi !
> Is it a bug ? Or is there a problem with my config ?

I'm running on Fedora Core 3 under Gnome with no problems and even
reasonably snappy performance. If you're still having trouble, please
provide your Linux distro, window manager, and desktop environment.

Regards,

Dave Orme
--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
Re: VE on linux ... no image of the controls ?! [message #605561 is a reply to message #81399] Wed, 23 February 2005 08:54 Go to previous message
Arnaud is currently offline ArnaudFriend
Messages: 60
Registered: July 2009
Member
OK, I get it work on another linux computer, with the same distro (MDK
10.1, linux 2.6.8 mdk build, KDE 3.2). Don't know why it doesn't work
correctly on my first computer, but I think I've been changing eclipse
configuration so many times on this one, that I should have lost
something ...

Anyway, on a good clean config, it works perfectly.

Not so perfectly actually. It appears that widget capture looks really
hugly : gradient of the title is not the same as real shell for example,
min/max/close buttons are just squares with icons in it, window icon
doesn't appear at the top left corner, window border looks just like a
fake of the real one ... Even controls don't look like the real ones.

Is it another bug from my config or is it the usual appearance on Linux
platform (cause win 32 looks great, I tested it) ?

I went a bit further in my investigation and isolated the code that
makes the capture : getImage(control, includeChildren) from ImageCapture
in o.e.v.i.swt.targetvm.unix, isn't it ? I used this code and the
swt-gtk-print.so library in a simple code to take a snapshot of a shell
and I get the same result as in VE.

If it is the "normal" behaviour, couldn't you consider use an external
tool as xwd to make a best capture ? I tried but I get a problem : the
handle returned by control.handle doesn't appear to be a valid handle
cause xwd can't reconize it. It's surprising cause I used the handle on
win32 platform to call WM_PRINT from a python tool and manage to get a
valid capture of the control. Any ideas ?

--
Arnaud
Re: VE on linux ... no image of the controls ?! [message #605572 is a reply to message #81456] Wed, 23 February 2005 14:34 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

The problem is that unless we physically make it entirely visible on the
screen we can't get a capture of the frame controls. Those are added
outside of the paint mechanism in GTK. WM_PRINT only works on Windows
for getting a screenshot. It doesn't work on GTK. We had to put in C
code that actually did a paint to an image, and that paint doesn't do
the frame controls. So we have to emulate the frame controls.

--
Thanks,
Rich Kulp
Re: VE on linux ... no image of the controls ?! [message #605576 is a reply to message #81528] Wed, 23 February 2005 17:14 Go to previous message
Arnaud is currently offline ArnaudFriend
Messages: 60
Registered: July 2009
Member
And what about the xwd option ?

It should work out-of-the-box if I could provide it a valid handle.
Unfortunatly, as I said before, the handle returned by control.handle (I
talk about SWT of course) does return a valid number for win32 platform
but doesn't seem to provide the good widget number for X, so xwd return
an error.

There is another xwd option which is to pass as argument the name of the
control, but I can't figure how to get it from eclipse.
Any idea ?

--
Arnaud
Re: VE on linux ... no image of the controls ?! [message #605578 is a reply to message #81553] Wed, 23 February 2005 17:24 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You're out of my league now. :-) I wasn't the one who wrote the code to
get the image on GTK. There was no way he could find to get an image of
the frame controls in installation independent way (i.e. it works on
Redhat Linux, SUSE, etc.).

Arnaud wrote:
> And what about the xwd option ?
>
> It should work out-of-the-box if I could provide it a valid handle.
> Unfortunatly, as I said before, the handle returned by control.handle (I
> talk about SWT of course) does return a valid number for win32 platform
> but doesn't seem to provide the good widget number for X, so xwd return
> an error.
>
> There is another xwd option which is to pass as argument the name of the
> control, but I can't figure how to get it from eclipse.
> Any idea ?
>
> --
> Arnaud

--
Thanks,
Rich Kulp
Re: VE on linux ... no image of the controls ?! [message #605582 is a reply to message #81568] Thu, 24 February 2005 09:46 Go to previous message
Arnaud is currently offline ArnaudFriend
Messages: 60
Registered: July 2009
Member
OK, you're right. Was just a suggestion.

I'll try to get it work and post a new bugzilla if needed (I think that
could help VE to have a nice capture on Linux platform and xwd can be
considered as an installation independant way, cause it is shipped with
all or almost all the distros that have a X server - the c program could
anyway simply test if xwd is installed or not and get the capture by two
different ways).

Thanks for answers.

--
Arnaud

Rich Kulp a écrit :
> You're out of my league now. :-) I wasn't the one who wrote the code to
> get the image on GTK. There was no way he could find to get an image of
> the frame controls in installation independent way (i.e. it works on
> Redhat Linux, SUSE, etc.).
>
> Arnaud wrote:
>
>> And what about the xwd option ?
>>
>> It should work out-of-the-box if I could provide it a valid handle.
>> Unfortunatly, as I said before, the handle returned by control.handle
>> (I talk about SWT of course) does return a valid number for win32
>> platform but doesn't seem to provide the good widget number for X, so
>> xwd return an error.
>>
>> There is another xwd option which is to pass as argument the name of
>> the control, but I can't figure how to get it from eclipse.
>> Any idea ?
>>
>> --
>> Arnaud
>
>
Re: VE on linux ... no image of the controls ?! [message #605587 is a reply to message #81596] Thu, 24 February 2005 14:56 Go to previous message
Jeff Myers is currently offline Jeff MyersFriend
Messages: 396
Registered: July 2009
Senior Member
Arnaud,

We looked at xwd, but it only works when the window being captured is on
screen and visible (to the front). We try to make the target vm window
as inconspicuous as possible (to varying degrees of success) - so
flashing it on screen every time we need to do a capture would be ugly.
We were considering launching a Xvfb X server and putting the remote
vm windows there... in that case since it's all virtual we could bring
the windows to the front and use xwd to do the capture. But that
approach has its own complications...

Any other ideas of how to improve the capture process are very welcome.
We're hardly experts in this area.

Thanks,

- Jeff

Arnaud wrote:
> OK, you're right. Was just a suggestion.
>
> I'll try to get it work and post a new bugzilla if needed (I think that
> could help VE to have a nice capture on Linux platform and xwd can be
> considered as an installation independant way, cause it is shipped with
> all or almost all the distros that have a X server - the c program could
> anyway simply test if xwd is installed or not and get the capture by two
> different ways).
>
> Thanks for answers.
>
> --
> Arnaud
Re: VE on linux ... no image of the controls ?! [message #605590 is a reply to message #81626] Thu, 24 February 2005 16:14 Go to previous message
Arnaud is currently offline ArnaudFriend
Messages: 60
Registered: July 2009
Member
Jeff Myers a écrit :
> Arnaud,
>
> We looked at xwd, but it only works when the window being captured is on
> screen and visible (to the front).

I thought xwd could capture offscreen windows (I've read it somewhere)
but didn't try it. I also thought to the X server ... (but was far from
knowing exactly how to do it). Too bad we can't manage to do it simply
on Linux. I'll keep an eye on it while finishing to make my program ...

SY

--
Arnaud
Re: VE on linux ... no image of the controls ?! [message #605593 is a reply to message #81456] Thu, 24 February 2005 16:25 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Arnaud wrote:
> Not so perfectly actually. It appears that widget capture looks really
> hugly : gradient of the title is not the same as real shell for example,
> min/max/close buttons are just squares with icons in it, window icon
> doesn't appear at the top left corner, window border looks just like a
> fake of the real one ... Even controls don't look like the real ones.

Yes, as Rich says, this is a platform limitation.

I'd make a design suggestion that you always edit a Composite. Then you
can embed that Composite in anything: a Shell, an Eclipse View or
Editor, a Dialog, whatever.

BTW, really nice code sluthing you've done there! Excellent work!


Best regards,

Dave Orme

--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
Re: VE on linux ... no image of the controls ?! [message #605595 is a reply to message #81655] Thu, 24 February 2005 16:34 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Arnaud wrote:
> Jeff Myers a écrit :
>
>> Arnaud,
>>
>> We looked at xwd, but it only works when the window being captured is
>> on screen and visible (to the front).
>
>
> I thought xwd could capture offscreen windows (I've read it somewhere)
> but didn't try it. I also thought to the X server ... (but was far from
> knowing exactly how to do it). Too bad we can't manage to do it simply
> on Linux. I'll keep an eye on it while finishing to make my program ...

I just had an idea: what if we used a VNC server to run an invisible
X-Windows session...?

With some work, this might even be made to work across all platforms so
we could have one code base on all platforms--even Mac.

The downside is that you'd always get some varient of X Windows widgets
(either GTK or Motif), even on non-X platforms, but it would work. With
GTK, this might not be so awful if you chose a theme that emulated the
look of the native widgets (Carbon/Cocoa/win32). And because you could
connect to the VNC server using a VNC client, you could debug the remote
VM interactively...

Thoughts, Rich? Jeff? Arnaud?


Regards,

Dave Orme

--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
Re: VE on linux ... no image of the controls ?! [message #605599 is a reply to message #81696] Fri, 25 February 2005 10:01 Go to previous message
Arnaud is currently offline ArnaudFriend
Messages: 60
Registered: July 2009
Member
David J. Orme a écrit :
> I just had an idea: what if we used a VNC server to run an invisible
> X-Windows session...?
>
> With some work, this might even be made to work across all platforms so
> we could have one code base on all platforms--even Mac.
>
> The downside is that you'd always get some varient of X Windows widgets
> (either GTK or Motif), even on non-X platforms, but it would work. With
> GTK, this might not be so awful if you chose a theme that emulated the
> look of the native widgets (Carbon/Cocoa/win32). And because you could
> connect to the VNC server using a VNC client, you could debug the remote
> VM interactively...
>
> Thoughts, Rich? Jeff? Arnaud?

Woawh ! Completly out of my competences (VNC server, ...). Sorry :(

But it seems really interesting.

--
Arnaud
Re: VE on linux ... no image of the controls ?! [message #605604 is a reply to message #81696] Fri, 25 February 2005 14:06 Go to previous message
Jeff Myers is currently offline Jeff MyersFriend
Messages: 396
Registered: July 2009
Senior Member
David J. Orme wrote:
>
>
> I just had an idea: what if we used a VNC server to run an invisible
> X-Windows session...?
>
> With some work, this might even be made to work across all platforms so
> we could have one code base on all platforms--even Mac.
>
> The downside is that you'd always get some varient of X Windows widgets
> (either GTK or Motif), even on non-X platforms, but it would work. With
> GTK, this might not be so awful if you chose a theme that emulated the
> look of the native widgets (Carbon/Cocoa/win32). And because you could
> connect to the VNC server using a VNC client, you could debug the remote
> VM interactively...
>
> Thoughts, Rich? Jeff? Arnaud?
>
>
> Regards,
>
> Dave Orme
>

My experience of using VNC server on Windows is it doesn't create a
separate session, just controls the active Windows user's desktop. So
it wouldn't have any benefit over the current approach. It looks like
the OS X VNC server has the same limitation (See
http://www.redstonesoftware.com/osxvnc/OSXvnc.html Q: Can I setup OSXvnc
to allow a remote user to work in his own desktop without disrupting the
user at the machine(like X-Windows)? ) As a X-Windows only solution, I
don't see much of a benefit that this would provide above using the Xvfb
solution.

- Jeff
Re: VE on linux ... no image of the controls ?! [message #605609 is a reply to message #81456] Fri, 25 February 2005 15:51 Go to previous message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hi Arnaud,
Could you please tell me which version of GTK/GTK+ you have on the
system which doesnt work?
Regards,
Sri.



Arnaud wrote:
> OK, I get it work on another linux computer, with the same distro (MDK
> 10.1, linux 2.6.8 mdk build, KDE 3.2). Don't know why it doesn't work
> correctly on my first computer, but I think I've been changing eclipse
> configuration so many times on this one, that I should have lost
> something ...
>
> Anyway, on a good clean config, it works perfectly.
>
> Not so perfectly actually. It appears that widget capture looks really
> hugly : gradient of the title is not the same as real shell for example,
> min/max/close buttons are just squares with icons in it, window icon
> doesn't appear at the top left corner, window border looks just like a
> fake of the real one ... Even controls don't look like the real ones.
>
> Is it another bug from my config or is it the usual appearance on Linux
> platform (cause win 32 looks great, I tested it) ?
>
> I went a bit further in my investigation and isolated the code that
> makes the capture : getImage(control, includeChildren) from ImageCapture
> in o.e.v.i.swt.targetvm.unix, isn't it ? I used this code and the
> swt-gtk-print.so library in a simple code to take a snapshot of a shell
> and I get the same result as in VE.
>
> If it is the "normal" behaviour, couldn't you consider use an external
> tool as xwd to make a best capture ? I tried but I get a problem : the
> handle returned by control.handle doesn't appear to be a valid handle
> cause xwd can't reconize it. It's surprising cause I used the handle on
> win32 platform to call WM_PRINT from a python tool and manage to get a
> valid capture of the control. Any ideas ?
>
> --
> Arnaud
Re: VE on linux ... no image of the controls ?! [message #605611 is a reply to message #81696] Fri, 25 February 2005 17:18 Go to previous message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hi Dave,
I am always a little leery of using any third-party implementation of X
windowing server/system other than the default prescribed for the system
(X11.org/X.org/XFree86.org), as there could be subtle differences, which
happen only in the third-party implementation of the X server, which
could be difficult to explain and fix. If there is a problem with the
default X server, it could be termed as a system limitation - something
which cannot be said of third-party implementations. Apart from that,
like Jeff mentioned there could be difference of opinion as to what
actually constitutes a display in third-party implementations.
Xvfb which is the headless X server implementation, is provided by all
the standard X windowing system manufacturers
(X11.org/X.org/XFree86.org) and would be a good candidate for what we
want to use it for - though there are some issues in general.
Regards,
Sri.



David J. Orme wrote:
> Arnaud wrote:
>
>> Jeff Myers a écrit :
>>
>>> Arnaud,
>>>
>>> We looked at xwd, but it only works when the window being captured is
>>> on screen and visible (to the front).
>>
>>
>>
>> I thought xwd could capture offscreen windows (I've read it somewhere)
>> but didn't try it. I also thought to the X server ... (but was far
>> from knowing exactly how to do it). Too bad we can't manage to do it
>> simply on Linux. I'll keep an eye on it while finishing to make my
>> program ...
>
>
> I just had an idea: what if we used a VNC server to run an invisible
> X-Windows session...?
>
> With some work, this might even be made to work across all platforms so
> we could have one code base on all platforms--even Mac.
>
> The downside is that you'd always get some varient of X Windows widgets
> (either GTK or Motif), even on non-X platforms, but it would work. With
> GTK, this might not be so awful if you chose a theme that emulated the
> look of the native widgets (Carbon/Cocoa/win32). And because you could
> connect to the VNC server using a VNC client, you could debug the remote
> VM interactively...
>
> Thoughts, Rich? Jeff? Arnaud?
>
>
> Regards,
>
> Dave Orme
>
Re: VE on linux ... no image of the controls ?! [message #605614 is a reply to message #81797] Fri, 25 February 2005 18:22 Go to previous message
Arnaud is currently offline ArnaudFriend
Messages: 60
Registered: July 2009
Member
I'll check it tomorrow.

SY

Arnaud

Sri Gunturi a écrit :
> Hi Arnaud,
> Could you please tell me which version of GTK/GTK+ you have on the
> system which doesnt work?
> Regards,
> Sri.
>
Re: VE on linux ... no image of the controls ?! [message #605617 is a reply to message #81826] Sun, 27 February 2005 17:02 Go to previous message
Arnaud is currently offline ArnaudFriend
Messages: 60
Registered: July 2009
Member
It's GTK+2.0, version 2.4.9-9mdk.

--
Arnaud
Re: VE on linux ... no image of the controls ?! [message #605619 is a reply to message #81811] Sun, 27 February 2005 19:57 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Sri Gunturi wrote:
> Xvfb which is the headless X server implementation, is provided by
> all the standard X windowing system manufacturers

Learn something every day... I wasn't aware of Xvfb. Thanks.


Dave
--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
Previous Topic:Visual Cafe
Next Topic:Property Editor Code geneartion problem
Goto Forum:
  


Current Time: Thu Apr 25 15:43:39 GMT 2024

Powered by FUDForum. Page generated in 0.06022 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top