Lua/Fltk Window Options


Forum: Programming and Scripting
Topic: Lua/Fltk Window Options
started by: roberts

Posted by roberts on May 25 2008,19:28
Did we ever determine whether exact window placement is possible?

How to control which if any of a window controls are displayed, say I don't want to have the minimize and maximize controls to display?

Posted by mikshaw on May 26 2008,02:11
FLTK apparently has x and y coordinates as 3rd and 4th optional parameters of Fl_Window, but I assume the active window manager determines whether or not this works.

There is also my_window:iconize() for those window managers that support it, or my_window:position() if you want to shove it aside.

Posted by roberts on May 26 2008,02:16
I have mount.lua working in tiny core. But jwm has no slit so mount.lua starts from menu. But mount.lua's tiny size makes it hard to move as the window minimize, maximize and close controls occupy the entire title bar.
Posted by lucky13 on May 26 2008,02:35
Hmmm, can jwm swallow it in the tray?
Posted by lucky13 on May 26 2008,03:41
Another idea is to set it (via Group) without border or title, etc. That would require users to know they can move it via keybinding (alt-F2 for window options menu) or with alt-left mouse key. I'll have to dig around and see if there's any way to set placement geometry in jwm; I don't think there is (which is why I first thought of swallow but I don't know if that'll work well without rewriting it so the buttons are side by side).

This would put it on every desktop (sticky), without any window decorations, and leave it out of the tasklist. And, of course, placement would be random so it could end up in middle of the screen just as easily as in a corner. Without anything else to guide users to moving it without borders and title bars, though, this will be even more difficult to move around.
Code Sample

<Group>
<Name>mount.lua</Name>
<Option>notitle</Option>
<Option>noborder</Option>
<Option>nolist</Option>
<Option>sticky</Option>
</Group>

Posted by jpeters on May 26 2008,15:45
Quote (roberts @ May 26 2008,02:16)
I have mount.lua working in tiny core. But jwm has no slit so mount.lua starts from menu. But mount.lua's tiny size makes it hard to move as the window minimize, maximize and close controls occupy the entire title bar.

I don't know if changing the width of the border from default 4 in the WindowStyle tag would help. (max is 32)

Posted by roberts on May 26 2008,17:18
I am thinking that it is the window manager that add and places these controls. Not sure how Lua/Fltk via murgaLua bindings could communicate control of them. Probably easiest to just make the window a bit wider so that it is easy to click-grab title area to move.

I know I could have borderless but then would have to add a close button.

On jwm swallow, I am not sure that I would want the mount tool to be running all the time. A quick launch button would be OK. But then we into the "I don't like your text labels". Perhaps I will use T M P for terminal, mount tool, and panel.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.