wok-6.x diff lxpanel/stuff/fix_position.patch @ rev 21622
updated mpv (0.18.1 -> 0.29.1)
author | Hans-G?nter Theisgen |
---|---|
date | Sun May 26 10:44:33 2019 +0100 (2019-05-26) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/lxpanel/stuff/fix_position.patch Sun May 26 10:44:33 2019 +0100 1.3 @@ -0,0 +1,156 @@ 1.4 +Index: lxpanel-0.5.8/src/plugins/menu.c 1.5 +=================================================================== 1.6 +--- lxpanel-0.5.8.orig/src/plugins/menu.c 2011-10-05 23:55:47.000000000 +0200 1.7 ++++ lxpanel-0.5.8/src/plugins/menu.c 2011-10-05 23:55:49.000000000 +0200 1.8 +@@ -131,8 +131,8 @@ 1.9 + int ox, oy, w, h; 1.10 + Plugin *p; 1.11 + #if GTK_CHECK_VERSION(2,18,0) 1.12 +- GtkAllocation allocation; 1.13 +- gtk_widget_set_allocation(widget, &allocation); 1.14 ++ GtkAllocation *allocation = g_new0 (GtkAllocation, 1); 1.15 ++ gtk_widget_get_allocation(GTK_WIDGET(widget), allocation); 1.16 + #endif 1.17 + ENTER; 1.18 + p = g_object_get_data(G_OBJECT(widget), "plugin"); 1.19 +@@ -155,20 +155,20 @@ 1.20 + *x = ox; 1.21 + if (*x + w > gdk_screen_width()) 1.22 + #if GTK_CHECK_VERSION(2,18,0) 1.23 +- *x = ox + allocation.width - w; 1.24 ++ *x = ox + allocation->width - w; 1.25 + #else 1.26 + *x = ox + widget->allocation.width - w; 1.27 + #endif 1.28 + *y = oy - h; 1.29 + if (*y < 0) 1.30 + #if GTK_CHECK_VERSION(2,18,0) 1.31 +- *y = oy + allocation.height; 1.32 ++ *y = oy + allocation->height; 1.33 + #else 1.34 + *y = oy + widget->allocation.height; 1.35 + #endif 1.36 + } else { 1.37 + #if GTK_CHECK_VERSION(2,18,0) 1.38 +- *x = ox + allocation.width; 1.39 ++ *x = ox + allocation->width; 1.40 + #else 1.41 + *x = ox + widget->allocation.width; 1.42 + #endif 1.43 +@@ -177,19 +177,22 @@ 1.44 + *y = oy; 1.45 + if (*y + h > gdk_screen_height()) 1.46 + #if GTK_CHECK_VERSION(2,18,0) 1.47 +- *y = oy + allocation.height - h; 1.48 ++ *y = oy + allocation->height - h; 1.49 + #else 1.50 + *y = oy + widget->allocation.height - h; 1.51 + #endif 1.52 + } 1.53 + DBG("widget: x,y=%d,%d w,h=%d,%d\n", ox, oy, 1.54 + #if GTK_CHECK_VERSION(2,18,0) 1.55 +- allocation.width, allocation.height ); 1.56 ++ allocation->width, allocation->height ); 1.57 + #else 1.58 + widget->allocation.width, widget->allocation.height ); 1.59 + #endif 1.60 + DBG("w-h %d %d\n", w, h); 1.61 + *push_in = TRUE; 1.62 ++#if GTK_CHECK_VERSION(2,18,0) 1.63 ++ g_free (allocation); 1.64 ++#endif 1.65 + RET(); 1.66 + } 1.67 + 1.68 +@@ -634,8 +637,8 @@ 1.69 + { 1.70 + ENTER; 1.71 + #if GTK_CHECK_VERSION(2,18,0) 1.72 +- GtkAllocation allocation; 1.73 +- gtk_widget_get_allocation(widget, &allocation); 1.74 ++ GtkAllocation *allocation = g_new0 (GtkAllocation, 1); 1.75 ++ gtk_widget_get_allocation(GTK_WIDGET(widget), allocation); 1.76 + #endif 1.77 + 1.78 + /* Standard right-click handling. */ 1.79 +@@ -644,14 +647,17 @@ 1.80 + 1.81 + if ((event->type == GDK_BUTTON_PRESS) 1.82 + #if GTK_CHECK_VERSION(2,18,0) 1.83 +- && (event->x >=0 && event->x < allocation.width) 1.84 +- && (event->y >=0 && event->y < allocation.height)) { 1.85 ++ && (event->x >=0 && event->x < allocation->width) 1.86 ++ && (event->y >=0 && event->y < allocation->height)) { 1.87 + #else 1.88 + && (event->x >=0 && event->x < widget->allocation.width) 1.89 + && (event->y >=0 && event->y < widget->allocation.height)) { 1.90 + #endif 1.91 + show_menu( widget, plugin, event->button, event->time ); 1.92 + } 1.93 ++#if GTK_CHECK_VERSION(2,18,0) 1.94 ++ g_free (allocation); 1.95 ++#endif 1.96 + RET(TRUE); 1.97 + } 1.98 + 1.99 +Index: lxpanel-0.5.8/src/plugins/pager.c 1.100 +=================================================================== 1.101 +--- lxpanel-0.5.8.orig/src/plugins/pager.c 2011-10-05 23:55:47.000000000 +0200 1.102 ++++ lxpanel-0.5.8/src/plugins/pager.c 2011-10-05 23:56:29.000000000 +0200 1.103 +@@ -271,10 +271,10 @@ 1.104 + { 1.105 + /* Allocate pixmap and statistics buffer without border pixels. */ 1.106 + #if GTK_CHECK_VERSION(2,18,0) 1.107 +- GtkAllocation allocation; 1.108 +- gtk_widget_get_allocation(widget, &allocation); 1.109 +- int new_pixmap_width = allocation.width; 1.110 +- int new_pixmap_height = allocation.height; 1.111 ++ GtkAllocation *allocation = g_new0 (GtkAllocation, 1); 1.112 ++ gtk_widget_get_allocation(GTK_WIDGET(widget), allocation); 1.113 ++ int new_pixmap_width = allocation->width; 1.114 ++ int new_pixmap_height = allocation->height; 1.115 + #else 1.116 + int new_pixmap_width = widget->allocation.width; 1.117 + int new_pixmap_height = widget->allocation.height; 1.118 +@@ -292,8 +292,8 @@ 1.119 + 1.120 + /* Compute the horizontal and vertical scale factors, and mark the desktop for redraw. */ 1.121 + #if GTK_CHECK_VERSION(2,18,0) 1.122 +- d->scale_y = (gfloat) allocation.height / (gfloat) gdk_screen_height(); 1.123 +- d->scale_x = (gfloat) allocation.width / (gfloat) gdk_screen_width(); 1.124 ++ d->scale_y = (gfloat) allocation->height / (gfloat) gdk_screen_height(); 1.125 ++ d->scale_x = (gfloat) allocation->width / (gfloat) gdk_screen_width(); 1.126 + #else 1.127 + d->scale_y = (gfloat) allocation->height / (gfloat) gdk_screen_height(); 1.128 + d->scale_x = (gfloat) allocation->width / (gfloat) gdk_screen_width(); 1.129 +@@ -305,6 +305,9 @@ 1.130 + gtk_widget_set_size_request(widget, 1.131 + (d->pg->plugin->panel->icon_size - BORDER_WIDTH * 2) * d->pg->aspect_ratio, 1.132 + d->pg->plugin->panel->icon_size - BORDER_WIDTH * 2); 1.133 ++#if GTK_CHECK_VERSION(2,18,0) 1.134 ++ g_free (allocation); 1.135 ++#endif 1.136 + return FALSE; 1.137 + } 1.138 + 1.139 +@@ -326,8 +329,8 @@ 1.140 + { 1.141 + GtkWidget * widget = GTK_WIDGET(d->da); 1.142 + #if GTK_CHECK_VERSION(2,18,0) 1.143 +- GtkAllocation allocation; 1.144 +- gtk_widget_get_allocation(widget, &allocation); 1.145 ++ GtkAllocation *allocation = g_new0 (GtkAllocation, 1); 1.146 ++ gtk_widget_get_allocation(GTK_WIDGET(widget), allocation); 1.147 + #endif 1.148 + gdk_draw_rectangle( 1.149 + d->pixmap, 1.150 +@@ -336,7 +339,8 @@ 1.151 + : style->dark_gc[GTK_STATE_NORMAL]), 1.152 + TRUE, 1.153 + #if GTK_CHECK_VERSION(2,18,0) 1.154 +- 0, 0, allocation.width, allocation.height); 1.155 ++ 0, 0, allocation->width, allocation->height); 1.156 ++ g_free (allocation); 1.157 + #else 1.158 + 0, 0, widget->allocation.width, widget->allocation.height); 1.159 + #endif