Commit dd9a9d9d authored by Matthias Clasen's avatar Matthias Clasen

Deprecate gtk_menu_popup and gtk_menu_popup_for_device

These functions don't work well on backends without global
coordinates (such as Wayland or Mir), and the gtk_menu_popup_at_
variants are better alternatives.

https://bugzilla.gnome.org/show_bug.cgi?id=772552
parent 0ecc4ac7
......@@ -2039,7 +2039,15 @@ gtk_menu_popup_internal (GtkMenu *menu,
* Only if no such event is available, gtk_get_current_event_time() can
* be used instead.
*
* Note that this function does not work very well on GDK backends that
* do not have global coordinates, such as Wayland or Mir. You should
* probably use one of the gtk_menu_popup_at_ variants, which do not
* have this problem.
*
* Since: 3.0
*
* Deprecated: 3.22: Please use gtk_menu_popup_at_widget(),
* gtk_menu_popup_at_pointer(). or gtk_menu_popup_at_rect() instead
*/
void
gtk_menu_popup_for_device (GtkMenu *menu,
......@@ -2103,6 +2111,14 @@ gtk_menu_popup_for_device (GtkMenu *menu,
* a mouse click or key press) that caused the initiation of the popup.
* Only if no such event is available, gtk_get_current_event_time() can
* be used instead.
*
* Note that this function does not work very well on GDK backends that
* do not have global coordinates, such as Wayland or Mir. You should
* probably use one of the gtk_menu_popup_at_ variants, which do not
* have this problem.
*
* Deprecated: 3.22: Please use gtk_menu_popup_at_widget(),
* gtk_menu_popup_at_pointer(). or gtk_menu_popup_at_rect() instead
*/
void
gtk_menu_popup (GtkMenu *menu,
......@@ -2119,6 +2135,7 @@ gtk_menu_popup (GtkMenu *menu,
NULL,
parent_menu_shell,
parent_menu_item,
func, data, NULL,
button, activate_time);
}
......
......@@ -134,7 +134,7 @@ GDK_AVAILABLE_IN_3_4
GtkWidget* gtk_menu_new_from_model (GMenuModel *model);
/* Display the menu onscreen */
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR((gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect))
void gtk_menu_popup (GtkMenu *menu,
GtkWidget *parent_menu_shell,
GtkWidget *parent_menu_item,
......@@ -142,7 +142,7 @@ void gtk_menu_popup (GtkMenu *menu,
gpointer data,
guint button,
guint32 activate_time);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR((gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect))
void gtk_menu_popup_for_device (GtkMenu *menu,
GdkDevice *device,
GtkWidget *parent_menu_shell,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment