SV: [Nautilus-list] Ramiro: Information on nautilus_pop_up_contex t_menu()



Wouldn't it be safer to grab the pointer, then pop up the menu?

I havn't checked your code but what if the window manager don't
respect no_decoration (WM_NO_DECORATION?) and put a frame on the menu.
If I'm not wrong (gee, would be nice..) the no_decoration atom tells
the window manager not to make a mess and put all kinds of handles on
the window, still it is free to decorate the window with a static frame.

John Blad 


>Hi Nate,

>There are some comments in the implementation of
>nautilus_pop_up_context_menu that explain the details of its workings. The
>reason the function was invented was to have a cover for popping up a
>context menu offset by a few pixels from the mouse position, so that
>clicking and releasing would not select the first menu item. By default,
the
>menu appears under the mouse button, so you would get this dangerous
>behavior with a quick click/release.

>Later, we added the button-number-setting code for the reason explained in
>the comment.

>John Sullivan






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]