xmenu: my first project with xlib - Programming On Unix

Users browsing this thread: 1 Guest(s)
seninha
Long time nixers
(15-05-2020, 03:04 PM)venam Wrote: It seems that all your menu location calculation rely on the position of the parent window relative to the root window and the screen geometry instead of the position of the entries themselves. Thus, you have to keep track of both x and y position and refresh the position of the parent window constantly.

The positions are calculated at the beginning and are constant through the entire program, they are not recalculated.

(15-05-2020, 03:04 PM)venam Wrote: For example, you pass to the getmenuitem function the position of the pointer on the root window instead of the position relative to within the window. Namely, ev.xbutton.x_root and ev.xbutton.y_root instead of ev.xbutton.x and ev.xbutton.y. Those are defined in man 3 XMotionEvent, in the XButtonEvent structure.

I read the manuals and notice that, I will change that.

(15-05-2020, 03:04 PM)venam Wrote: I hope this mini overview can help make your menu better.

And it will!
Thanks for all help and support!
PS: xmenu is now on github


Messages In This Thread
xmenu: my first project with xlib - by seninha - 14-05-2020, 06:45 PM
RE: xmenu: my first project with xlib - by z3bra - 14-05-2020, 07:32 PM
RE: xmenu: my first project with xlib - by venam - 15-05-2020, 02:47 AM
RE: xmenu: my first project with xlib - by z3bra - 15-05-2020, 06:33 AM
RE: xmenu: my first project with xlib - by movq - 15-05-2020, 09:49 AM
RE: xmenu: my first project with xlib - by venam - 15-05-2020, 03:04 PM
RE: xmenu: my first project with xlib - by seninha - 15-05-2020, 07:29 PM
RE: xmenu: my first project with xlib - by venam - 19-05-2020, 12:49 AM
RE: xmenu: my first project with xlib - by opfez - 29-07-2020, 01:17 PM