News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
feedback please
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
Question  feedback please

I'm trying to work out something useful from Fl_Positioner, and so far have something that will reposition a secondary window on the desktop according to the location of the positioner's axis in the primary window. Unfortunately when the secondary window reaches the right or bottom side of the screen it jumps back halfway across the screen. At this time I don't know if it's because of a bug in FLTK or a limitation of my tiling window manager. I appreciate any feedback from people using more traditional desktop environments.

Code:
ww=Fl:w()/4
wh=Fl:h()/4

w=fltk:Fl_Double_Window(ww,wh+50,"positioner.lua")
w:callback(function() os.exit() end) -- forces both windows to close

posy=fltk:Fl_Positioner(0,0,ww,wh,"fltk:Fl_Positioner")

posy_xvalue=fltk:Fl_Output(0,wh+25,ww/2,25)
posy_yvalue=fltk:Fl_Output(ww/2,wh+25,ww/2,25)

posy:xstep(1)
posy:ystep(1)
posy:xbounds(0,Fl:w()) -- uses screen sizes for maximum values
posy:ybounds(0,Fl:h())

posy:callback(
function()
  posy_xvalue:value(" X: "..posy:xvalue())
  posy_yvalue:value(" Y: "..posy:yvalue())
  w2:position(posy:xvalue(),posy:yvalue()) -- set w2 position on desktop
end
)
fltk:Fl_End()
w2=fltk:Fl_Window(0,0,8,8)
w2:color(1)
w2:border(0)
w2:box(fltk.FL_UP_BOX)
fltk:Fl_End()
w:show()
w2:show()
Fl:run()

06-29-2009 11:51 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
feedback please - mikshaw - 06-29-2009 11:51 AM
RE: feedback please - mikshaw - 06-30-2009, 01:13 AM
RE: feedback please - jpjacobs - 06-30-2009, 06:01 AM
RE: feedback please - mikshaw - 06-30-2009, 12:28 PM
RE: feedback please - jpjacobs - 07-01-2009, 04:21 AM
RE: feedback please - MrBill - 07-02-2009, 03:34 AM
RE: feedback please - mikshaw - 07-02-2009, 12:33 PM
RE: feedback please - jpjacobs - 11-29-2010, 10:08 PM
RE: feedback please - mikshaw - 11-30-2010, 01:55 PM
RE: feedback please - JohnMurga - 12-06-2010, 07:05 AM
RE: feedback please - mikshaw - 12-06-2010, 08:08 AM
RE: feedback please - jpjacobs - 12-06-2010, 10:05 AM
RE: feedback please - mikshaw - 12-07-2010, 01:37 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: