mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-19 20:20:18 +00:00
Updated the disabled drag-motion block to traverse parents with gtk_widget_get_parent() and use GTK3-safe paned child accessors while retaining legacy fields for non-GTK3 builds.
This commit is contained in:
@@ -4616,8 +4616,18 @@ mg_drag_motion_cb (GtkWidget *widget, GdkDragContext *context, int x, int y, gui
|
|||||||
#if 0
|
#if 0
|
||||||
/* are both tree/userlist on the same side? */
|
/* are both tree/userlist on the same side? */
|
||||||
GtkPaned *paned;
|
GtkPaned *paned;
|
||||||
paned = (GtkPaned *)widget->parent->parent;
|
GtkWidget *parent;
|
||||||
if (paned->child1 != NULL && paned->child2 != NULL)
|
GtkWidget *grandparent;
|
||||||
|
parent = gtk_widget_get_parent (widget);
|
||||||
|
grandparent = parent ? gtk_widget_get_parent (parent) : NULL;
|
||||||
|
paned = grandparent ? GTK_PANED (grandparent) : NULL;
|
||||||
|
#if HAVE_GTK3
|
||||||
|
if (paned != NULL &&
|
||||||
|
gtk_paned_get_child1 (paned) != NULL &&
|
||||||
|
gtk_paned_get_child2 (paned) != NULL)
|
||||||
|
#else
|
||||||
|
if (paned != NULL && paned->child1 != NULL && paned->child2 != NULL)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
cairo_rectangle (cr, 1 + ox, 2 + oy, width - 3, height - 4);
|
cairo_rectangle (cr, 1 + ox, 2 + oy, width - 3, height - 4);
|
||||||
cairo_rectangle (cr, 0 + ox, 1 + oy, width - 1, height - 2);
|
cairo_rectangle (cr, 0 + ox, 1 + oy, width - 1, height - 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user