Slab
Slab copied to clipboard
Docking not working
I can't dock any window to any side of the screen in SlabTest. Dragging a window over one of the dock indicators does nothing. The indicator gets highlighted but nothing else happens.
Doing it programmatically like this:
if not docked then
Slab.WindowToDock("bottom")
docked = true
end
...makes the Window disappear, no matter if left
, right
or bottom
.
Hmm my commit for making dock work programmatically might have caused this issue. Will check soon
Were you using WindowToDock
with the SlabTest
?
Dragging does not work for me now too. I wonder if this is due to the changes with the mouse api?
Have you checked this https://github.com/flamendless/Slab/wiki/Dock#windowtodock ? this works for me
It's not caused by my changes. Every bug I report is double-checked against the released 0.9.0 code.
I tested WindowToDock
in SlabTest
. The window disappears.
Slab.BeginWindow('SlabTest', SlabTest_Options)
if not docked then
Slab.WindowToDock('left')
docked = true
end
I checked previous commits (before your changes) and yeah dragging wasn't working then. Weird that on a simple window it works but on SlabTest it does not 🤔 I'll have to do more digging
@megagrump figured out the problem, you should be using Left
/Right
/Bottom
(uppercase first character). I tested it on SlabTest and it works for me
Further testing shows the more of the following issues:
- if a window's (programmatically docked) title bar is single-clicked, it behaves as if the window is held down thus following the mouse/dragging the window.
- ~~Saving docked window to ini is problematic~~ Fixed
- Can't still just drag the window and make it dock manually like before
Maybe there should be an error when using WindowToDock
with an unknown value? Window just disappearing is confusing. It also gets saved with ~~W and H being 0 in this case~~ the non-existent location, meaning it stays hidden forever, even after a restart.
SlabTest
crashes on quit for me now if the window was not docked:
Error: /Internal/UI/Dock.lua:350: table index is nil
- Dock window programmatically
- Undock it with mouse
- Window can not be moved anymore
-
table index is nil
crash on exit
- Dock window programmatically
- Undock it with mouse
- Window can not be moved anymore
table index is nil
crash on exit
~~I tried reproducing it using these steps. I didnt encounter number 3 as I can still freely move the window around. I get the error at number 4.~~ Fixed.
About this issue, I'll fix this as soon as your refactoring of the Window is done so there won't be conflicts if we work on the same file at the same time.
Docking the main window to the right side of the screen does not look correct for me in SlabTest. Most of the window goes off the right side of the screen.
I still can't move the window after undocking.
Dock to the bottom, undock and quit the app. After restart: the window is in a weird position that makes it unusable. Only way to get out of this state is by deleting the saved ini file.
Whats your whole test file?
https://github.com/flamendless/Slab/blob/master/SlabTest.lua