Elv13 / radical

An extensible menu subsystem for Awesome WM
223 stars 16 forks source link

Context menu always opens in upper left corner #51

Open njbirth opened 5 years ago

njbirth commented 5 years ago

I tried to create a simple context menu. However, when I click on the connected widget, the menu always opens in the upper left corner (and not on the position of the widget). For better reproducibility, I just used the default awesome configuration at /etc/xdg/awesome/rc.lua and added the following code:

local radical = require("radical")

local menu = radical.context {
    style      = radical.style.classic,
    item_style = radical.item.style.arrow_single ,
    layout     = radical.layout.vertical,
}

menu:add_item {text="Item 1"}
menu:add_item {text="Item 2"}
menu:add_item {text="Item 3"}

local menutextbox = wibox.widget.textbox("Menu")
menutextbox:set_menu(menu, "button::pressed", 1)

(I also added the menutextbox to the wibar.)

In addition, the x and y options of the menu don't seem to work. At least there is no effect when I add something like menu.x = 50.

I use Arch Linux and my awesome version is 4.3. The output of awesome --version is

awesome v4.3 (Too long)
 • Compiled against Lua 5.3.5 (running with Lua 5.3)
 • D-Bus support: ✔
 • execinfo support: ✔
 • xcb-randr version: 1.6
 • LGI version: 0.9.2

(I previously asked a similar question at Stack Overflow. You then recommended me to make a bug report.)

Edit: Screenshot added. The menutextbox is in the upper right corner of the wibar. The menu is in the upper left corner.

screenshot