How to make windowshape working on Raspi

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

How to make windowshape working on Raspi

Post by [-hh] »

Great news,

due to a valuable hint of Alejandro and a hint of Richmond to that hint we have now a solution for making windowshape work with LC 6.5.1 and 7.0.4 on Raspi.

The attached image was done just now with a "windowShape" in LC 6.5.1 on a Raspi B stack I prepared for the time when windowshape will work. Now it's possible.
[Edit. After first crashes and some improvements it works now, see "Shaped RaspiStack #2" below.]

Here are the instructions:

Use the Terminal of your Raspi.

[1] sudo apt-get install xcompmgr
[2] cd /etc/xdg/autostart/
[3] sudo nano Xcompmgr.desktop

Then copy and paste the following.

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=XCompmgr
Comment=XCompmgr--our compositor
Exec=xcompmgr
Terminal=false
Type=Application
OnlyShowIn=XFCE;LXDE
Then type ctrl-o and then ctrl-x.
[4] sudo reboot

You are done.
WOW! Several stacks will now run on Raspi. What a wonderful weekend!
I'll post some stacks using windowshape as soon as I have them working.

Thanks Alejandro and Richmond!

Hermann
Attachments
Rectangular windowshape (look through to desktop)<br />on a Raspi B, made with LC 6.5.1
Rectangular windowshape (look through to desktop)
on a Raspi B, made with LC 6.5.1
Last edited by [-hh] on Mon Feb 01, 2016 8:42 pm, edited 1 time in total.
shiftLock happens
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: How to make windowshape working on Raspi

Post by [-hh] »

This works now out of the box:

Shaped RaspiStack #1 = splash213131.livecode

A zooming box, showing , LC-blue-logo, LC-green-logo, Richmond's "TOM" or Orange-N (regular N-polygons). Choose animation speed for that.

Choose an Orange-N with N<10 and click the button "Demo" (also with cmdKey/ctrlKey down what gives a nice animation, even on Raspi B).

I still can't believe it, how 'good' and clear now windowshape works, on a slow Raspi!
I hope, Fraser will see this and become proud of his work ...
Attachments
splash213131.livecode.zip
(173.47 KiB) Downloaded 1585 times
splashRaspi.png
splashRaspi.png (186.63 KiB) Viewed 43535 times
shiftLock happens
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: How to make windowshape working on Raspi

Post by [-hh] »

Shaped RaspiStack #2 = hhScreenShot3a.livecode

This is a screen-shot-stack, a resizable 'frame-shaped' LC stack. Runs on Mac/Win/Linux with LC 6-8 and, yes on RaspberryPi B and 2 (with LC 6.5.1 and 7.0.4 -- I'm very impressed how fast and good the light-weight compositor xcompmgr works).

Button "?" shows "prefs" and (if small, by clicking the info field) short help.
There are moreover many tooltips.
pentagon-shaped framed screenshot<br />an simple rectangular screenshot
pentagon-shaped framed screenshot
an simple rectangular screenshot
Features.
  • Choose a shape (button "S") of type
    = Rect -- and make unframed rectangular screenshots,
    = Oval or N-RP (regular N-polygons) -- and make shaped screenShots.
  • Drag the shape by its frame.
  • Resize the shape but the yellow most-right button.
  • Make a shotOne by clicking the green button.
  • Make a shotMany by clicking the lavender button (rate in millisecs and maxNumber are choosable)
oval-shaped framed screenshot and<br />10-gon-shaped framed screenshot
oval-shaped framed screenshot and
10-gon-shaped framed screenshot
There is one not-so-good effect on *all* Linux/Raspi OS' that I tried: The transparency shows up, LC makes fine snapshots of the visible area inside the LC-frame, but we cannot click through to desktop or other apps, what works without problems under MacOS X and Win7-10. Advantage: One cannot click through, but drag at the transparent parts too.

Speed.
(LC 7, L6 is faster, LC 8 is slower):
Simple Rectangle in total (incl. file saving) needs
on 'fast' machine < 500 ms, framedShots < 900 ms,
on Raspi2 < 200 ms framedShots 1800 ms.

Have fun!

p.s. The stack has no built-in-preview any more. But you can open the screenshotsFolder from a click on the size-info field. I'll expand the preview part to a separate Raspi stack (which will by that be independent of a working windowshape-feature).
Attachments
hhScreenShot3b.livecode.zip
(39.31 KiB) Downloaded 1542 times
shiftLock happens
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: How to make windowshape working on Raspi

Post by [-hh] »

Shaped RaspiStack #3 = drawTime3.livecode

Yet another animated windowshape -- what else than a clock drawn by polygons only?
I made that once for Raspi with a black background. Now, with windowshape available (that's why I post it here and not in the Raspi collection), we have indeed a version that runs even on a RaspiB with < 10% CPU-top as shaped window.

Scripts beat 'exactly' (the Raspi has no hardwareclock, so a little bit "faked" here) every second and change only what has to be changed in the polygons, then do a snapshot and shape the window.
Hold optionkey down while the clock is running to see the time needed per second-cycle, on a 'medium fast' desktop this is < 10 ms, on a Raspi2 < 40 ms and on a RaspiB < 80 ms.

I polished the stack a little bit, the features now in sum:
  • DoubleClick or use EscapeKey to start/stop.
  • When stopped you can set colours and switch display of seconds/day on/off.
  • RightClick a running clock to toggle date display (YY|MM|DD) and time display (yy:mm:dd).
  • Drag the clock around using its digits.
  • Click at the four edges of the clock to let move the clock slowly to the corresponding edge of the working screenRect.
Clock-shaped window on top of a recent Bing wallpaper
Clock-shaped window on top of a recent Bing wallpaper
The stack runs on Mac/Win/Linux with LC 6/LC 7/LC8
and on RaspberryPi with (the only available) LC 6.5.1 and 7.0.4.
Attachments
drawTime3.livecode.zip
(4.92 KiB) Downloaded 1527 times
shiftLock happens
MarthaRax
Posts: 1
Joined: Sun Jul 26, 2026 10:19 pm

-

Post by MarthaRax »

Thanks for your support For now just registering on the forums is all you need to do and please insure you keep an up to date email address. We will be contacting you a little bit later on when we add the in-game credits.
Post Reply