Cannot drag stack with controls set to empty offscreen
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Cannot drag stack with controls set to empty offscreen
I have a stack with a custom window shape whose controls are set to empty. I can drag the stack around the screen using a few lines of code in the stack script to detect the mouse click and drag etc.
However, I noticed I cannot drag the stack off screen unless the controls are set to anything *other* than empty.
To clarify the statement, I *can* drag the stack to as second monitor (so it's technically *off screen*) but I cannot position the stack even 2px off the bottom or left of my screen. It absolutely refuses to be positioned with even a little bit of itself *off screen*.
Usability-wise it makes dragging the stack around feel wrong.
So the question is this: do I need to enable a setting to allow a stack to be dragged party off screen when the controls are set to empty?
However, I noticed I cannot drag the stack off screen unless the controls are set to anything *other* than empty.
To clarify the statement, I *can* drag the stack to as second monitor (so it's technically *off screen*) but I cannot position the stack even 2px off the bottom or left of my screen. It absolutely refuses to be positioned with even a little bit of itself *off screen*.
Usability-wise it makes dragging the stack around feel wrong.
So the question is this: do I need to enable a setting to allow a stack to be dragged party off screen when the controls are set to empty?
Re: Cannot drag stack with controls set to empty offscreen
I should elaborate ... this problem only happens on Ubuntu Linux with 9 .6 .0
Re: Cannot drag stack with controls set to empty offscreen
Hi.I have a stack with a custom window shape whose controls are set to empty.
What does that mean? Controls are things like buttons and fields, that are resident on a card, which is part of a stack. How do you 'empty" one? I assume you do not mean to set the contents of such controls to empty. That would make no difference to the stack, and the stack would not know such a thing anyway.
Craig
Re: Cannot drag stack with controls set to empty offscreen
I'm sure Simon means empty "decorations"! 

Re: Cannot drag stack with controls set to empty offscreen
Hi again.
Do you mean that you deleted all controls?
I have never really used windowShapes, though I have played with them.
They usually do not have a titleBar, so dragging them around the screen is a problem. If you place this in the stack script:
With this I have no issue dragging the stack off screen, or to another connected monitor.
Craig
Do you mean that you deleted all controls?
I have never really used windowShapes, though I have played with them.
They usually do not have a titleBar, so dragging them around the screen is a problem. If you place this in the stack script:
Code: Select all
on mouseMove
if the mouse is down then set the loc of this stack to the screenMouseLoc
end mouseMove
Craig
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Cannot drag stack with controls set to empty offscreen
I believe this is a limitation of the Gnome Shell window manager. If you can find an API to override that behavior it may be worth submitting an enhancement request. Might be worth it without the API call, but since I doubt this would be a high priority the more work we can do up front the easier it becomes for the team to satisfy the request.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Cannot drag stack with controls set to empty offscreen
Klaus.
Simon, decorations are not controls.
Craig
Probably. But can you have decorations on a windowShaped stack? I made a oval image, set the windowShape, and I get an oval stack. How would a titlebar "track" the top of such a thing?I'm sure Simon means empty "decorations"!
Simon, decorations are not controls.
Craig
Re: Cannot drag stack with controls set to empty offscreen
Yes, I mean empty decorations. When I use the Property Inspector to set the decorations the last option is titled "empty".
And to set the decorations to *empty* I need to click on a button with a magic wand icon next to a field labelled *Controls* in the Property Inspector.
And to set the decorations to *empty* I need to click on a button with a magic wand icon next to a field labelled *Controls* in the Property Inspector.
Re: Cannot drag stack with controls set to empty offscreen
On Windows you can drag your oval shaped stack to rest partially outside the left, right or bottom of your visible computer display monitor.dunbarx wrote: ↑Tue Jun 23, 2020 7:21 pmKlaus.Probably. But can you have decorations on a windowShaped stack? I made a oval image, set the windowShape, and I get an oval stack. How would a titlebar "track" the top of such a thing?I'm sure Simon means empty "decorations"!
Simon, decorations are not controls.
Craig
However, on Ubuntu you would not be able to drag your stack partially outside of the visible screen area. This is what I discovered, it's specifically a Linux/Ubuntu bug/feature.
But when I set the *decorations* back to *default* on Ubuntu I can drag the stack partially off screen without issue.
-
- Livecode Opensource Backer
- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Re: Cannot drag stack with controls set to empty offscreen
So, surely, "the thing" would be to set the 'decorations' to 'default' only for the duration of a drag, and then reset them again?
Of course that might produce odd optical effects.
The last time I did anything with windowshape was about 19 years ago.
Of course that might produce odd optical effects.
The last time I did anything with windowshape was about 19 years ago.
-
- Livecode Opensource Backer
- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Re: Cannot drag stack with controls set to empty offscreen
I just made a stack called "FROG" that looks like this:
- -
It contains an image "JF" and the following stackScript:
Now I am trying to work out how to drag the stack anywhere at all.
- -
It contains an image "JF" and the following stackScript:
Code: Select all
on preOpenStack
set the windowShape of me to the id of img "JF"
end preOpenStack
- Attachments
-
- FROG.livecode.zip
- Here's the stack.
- (13.99 KiB) Downloaded 246 times
Re: Cannot drag stack with controls set to empty offscreen
Add the following to the stack cd script. It's likely that the "target" will end up being the frog so you'll need to modify the mouseMove to reflect that.richmond62 wrote: ↑Tue Jun 23, 2020 8:14 pmNow I am trying to work out how to drag the stack anywhere at all.
Code: Select all
# make entire stack draggable
local sgLeftOffset
local sgTopOffset
local sgDragging
local sgBounds
local sgTarget
on mouseDown
put item 1 of the mouseLoc into sgLeftOffset
put item 2 of the mouseLoc into sgTopOffset
put the short name of target into sgTarget
put true into sgDragging
end mouseDown
on mouseMove
lock screen
put sgTarget into msg
if sgTarget is the short name of this cd then
moveFinder
end if
unlock screen
end mouseMove
on moveFinder
if sgDragging is true then
set the left of this stack to item 1 of \
globalloc(the mouseLoc) - sgLeftOffset
set the top of this stack to item 2 of \
globalloc(the mouseLoc) - sgTopOffset
end if
end moveFinder
on mouseRelease
cleanUp
end mouseRelease
on mouseUp
cleanUp
end mouseUp
on cleanUp
put false into sgDragging
end cleanUp
Re: Cannot drag stack with controls set to empty offscreen
Hmmm>
If i set the windowShape of a simple stack to the ID of an oval image on that stack, I get an oval shaped stack the size of the image. Regardless of what I do with the decorations, I cannot move the stack with the mouse. There is nothing to "grab" onto. No titleBar, minimize button, etc, ever appears.
I can move the "underlying" oval image in the oval stack window as normal. Only my little mouseMove handler allows me to move that stack.
Is this a me thing or a Mac thing?
Craig
If i set the windowShape of a simple stack to the ID of an oval image on that stack, I get an oval shaped stack the size of the image. Regardless of what I do with the decorations, I cannot move the stack with the mouse. There is nothing to "grab" onto. No titleBar, minimize button, etc, ever appears.
I can move the "underlying" oval image in the oval stack window as normal. Only my little mouseMove handler allows me to move that stack.
Is this a me thing or a Mac thing?
Craig
Re: Cannot drag stack with controls set to empty offscreen
Probably my poor instructions...dunbarx wrote: ↑Wed Jun 24, 2020 1:51 pmHmmm>
If i set the windowShape of a simple stack to the ID of an oval image on that stack, I get an oval shaped stack the size of the image. Regardless of what I do with the decorations, I cannot move the stack with the mouse. There is nothing to "grab" onto. No titleBar, minimize button, etc, ever appears.
I can move the "underlying" oval image in the oval stack window as normal. Only my little mouseMove handler allows me to move that stack.
Is this a me thing or a Mac thing?
Craig
In the mouseMouse script the short name of target *must* be the stack or card name. So if you put the script in the stack you need to update the code to check target for the stack name.
If you have a shape on the card blocking direct clicks to the card then the script will not do anything. Move or hide your shape so you can click on the stack and move it.