Fix the problem that the prompt information of network icon volume icon is not displayed,update xscreen size when x11 screen size change,always send the monitors changed signal when screen size change and add function definition of gtk_image_set_from_pixbuf_with_scale
(cherry picked from commit a7f222592da67df1ba62f5e876570f01bbe0a3cd)
This commit is contained in:
parent
c4ab288994
commit
0a7ce1cca1
67
fix-add-function-definition-of-gtk-image-set-from-pi.patch
Normal file
67
fix-add-function-definition-of-gtk-image-set-from-pi.patch
Normal file
@ -0,0 +1,67 @@
|
||||
From 5bd8c8cfca3b435c0bf5eefb771f332fe6804c14 Mon Sep 17 00:00:00 2001
|
||||
From: yangchenguang <yangchenguang@kylinsec.com.cn>
|
||||
Date: Thu, 13 Apr 2023 11:13:03 +0800
|
||||
Subject: [PATCH 1/4] fix(*): add function definition of gtk image set from
|
||||
pixbuf
|
||||
|
||||
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
|
||||
---
|
||||
gtk/gtkimage.c | 26 ++++++++++++++++++++++++++
|
||||
gtk/gtkimage.h | 4 ++++
|
||||
2 files changed, 30 insertions(+)
|
||||
|
||||
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
|
||||
index 5d6e715..e84b821 100644
|
||||
--- a/gtk/gtkimage.c
|
||||
+++ b/gtk/gtkimage.c
|
||||
@@ -1120,6 +1120,32 @@ gtk_image_set_from_pixbuf (GtkImage *image,
|
||||
g_object_thaw_notify (G_OBJECT (image));
|
||||
}
|
||||
|
||||
+extern void
|
||||
+gtk_image_set_from_pixbuf_with_scale (GtkImage *image,
|
||||
+ GdkPixbuf *pixbuf,
|
||||
+ int scale)
|
||||
+{
|
||||
+ GtkImagePrivate *priv;
|
||||
+
|
||||
+ g_return_if_fail (GTK_IS_IMAGE (image));
|
||||
+ g_return_if_fail (pixbuf == NULL ||
|
||||
+ GDK_IS_PIXBUF (pixbuf));
|
||||
+
|
||||
+ priv = image->priv;
|
||||
+
|
||||
+ g_object_freeze_notify (G_OBJECT (image));
|
||||
+
|
||||
+ gtk_image_clear (image);
|
||||
+
|
||||
+ if (pixbuf != NULL)
|
||||
+ _gtk_icon_helper_set_pixbuf (priv->icon_helper, pixbuf);
|
||||
+
|
||||
+ _gtk_icon_helper_set_pixbuf_scale (priv->icon_helper, scale);
|
||||
+ g_object_notify_by_pspec (G_OBJECT (image), image_props[PROP_PIXBUF]);
|
||||
+
|
||||
+ g_object_thaw_notify (G_OBJECT (image));
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* gtk_image_set_from_stock:
|
||||
* @image: a #GtkImage
|
||||
diff --git a/gtk/gtkimage.h b/gtk/gtkimage.h
|
||||
index 68b9a6d..b679bce 100644
|
||||
--- a/gtk/gtkimage.h
|
||||
+++ b/gtk/gtkimage.h
|
||||
@@ -144,6 +144,10 @@ GDK_AVAILABLE_IN_ALL
|
||||
void gtk_image_set_from_resource (GtkImage *image,
|
||||
const gchar *resource_path);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
+void gtk_image_set_from_pixbuf_with_scale (GtkImage *image,
|
||||
+ GdkPixbuf *pixbuf,
|
||||
+ int scale_factor);
|
||||
+GDK_AVAILABLE_IN_ALL
|
||||
void gtk_image_set_from_pixbuf (GtkImage *image,
|
||||
GdkPixbuf *pixbuf);
|
||||
GDK_DEPRECATED_IN_3_10_FOR(gtk_image_set_from_icon_name)
|
||||
--
|
||||
2.33.0
|
||||
|
||||
30
fix-gtk3-always-send-the-monitors-changed-signal.patch
Normal file
30
fix-gtk3-always-send-the-monitors-changed-signal.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 775ba324d5f0e5272d44bff55a585c5583e0e3ee Mon Sep 17 00:00:00 2001
|
||||
From: yangchenguang <yangchenguang@kylinsec.com.cn>
|
||||
Date: Thu, 13 Apr 2023 11:22:12 +0800
|
||||
Subject: [PATCH 3/4] fix(*): gtk3 always send the monitors changed signal
|
||||
|
||||
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
|
||||
---
|
||||
gdk/x11/gdkscreen-x11.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
|
||||
index 6646ee4..72ee247 100644
|
||||
--- a/gdk/x11/gdkscreen-x11.c
|
||||
+++ b/gdk/x11/gdkscreen-x11.c
|
||||
@@ -1215,9 +1215,11 @@ _gdk_x11_screen_size_changed (GdkScreen *screen,
|
||||
if (width != xscreen->width ||
|
||||
height != xscreen->height)
|
||||
{
|
||||
- process_monitors_change (screen);
|
||||
g_signal_emit_by_name (screen, "size-changed");
|
||||
}
|
||||
+
|
||||
+ //process monitors change at here, because monitors change and screen size change is not same
|
||||
+ process_monitors_change (screen);
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.33.0
|
||||
|
||||
26
fix-the-problem-that-the-prompt-information-of-netwo.patch
Normal file
26
fix-the-problem-that-the-prompt-information-of-netwo.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From d6c5b1e9965768ad009addebbf2e5e05de2b5a7d Mon Sep 17 00:00:00 2001
|
||||
From: yangchenguang <yangchenguang@kylinsec.com.cn>
|
||||
Date: Thu, 13 Apr 2023 11:23:25 +0800
|
||||
Subject: [PATCH 4/4] fix(*): the problem that the prompt information of netwo
|
||||
|
||||
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
|
||||
---
|
||||
gtk/gtktooltip.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
|
||||
index 9917d93..6592dd1 100644
|
||||
--- a/gtk/gtktooltip.c
|
||||
+++ b/gtk/gtktooltip.c
|
||||
@@ -962,7 +962,7 @@ gtk_tooltip_position (GtkTooltip *tooltip,
|
||||
&anchor_rect,
|
||||
GDK_GRAVITY_SOUTH,
|
||||
GDK_GRAVITY_NORTH,
|
||||
- GDK_ANCHOR_FLIP_Y | GDK_ANCHOR_SLIDE_X,
|
||||
+ GDK_ANCHOR_FLIP_Y | GDK_ANCHOR_SLIDE,
|
||||
rect_anchor_dx, 0);
|
||||
gtk_widget_show (GTK_WIDGET (tooltip->current_window));
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
54
fix-update-the-xscreen-size-when-x11-screen-change-s.patch
Normal file
54
fix-update-the-xscreen-size-when-x11-screen-change-s.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 6c2165171ecef153db63b17bcd8ec4a20e866c91 Mon Sep 17 00:00:00 2001
|
||||
From: yangchenguang <yangchenguang@kylinsec.com.cn>
|
||||
Date: Thu, 13 Apr 2023 11:19:01 +0800
|
||||
Subject: [PATCH 2/4] fix(*): update the xscreen size when x11 screen change
|
||||
size
|
||||
|
||||
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
|
||||
---
|
||||
gdk/x11/gdkscreen-x11.c | 13 ++++++++-----
|
||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
|
||||
index bb4df05..6646ee4 100644
|
||||
--- a/gdk/x11/gdkscreen-x11.c
|
||||
+++ b/gdk/x11/gdkscreen-x11.c
|
||||
@@ -1186,9 +1186,10 @@ _gdk_x11_screen_size_changed (GdkScreen *screen,
|
||||
#ifdef HAVE_RANDR
|
||||
GdkX11Display *display_x11;
|
||||
#endif
|
||||
+ Screen *xscreen = gdk_x11_screen_get_xscreen (screen);
|
||||
|
||||
- width = gdk_x11_screen_get_width (screen);
|
||||
- height = gdk_x11_screen_get_height (screen);
|
||||
+ width = xscreen->width;
|
||||
+ height = xscreen->height;
|
||||
|
||||
#ifdef HAVE_RANDR
|
||||
display_x11 = GDK_X11_DISPLAY (gdk_screen_get_display (screen));
|
||||
@@ -1201,7 +1202,6 @@ _gdk_x11_screen_size_changed (GdkScreen *screen,
|
||||
if (event->type == ConfigureNotify)
|
||||
{
|
||||
XConfigureEvent *rcevent = (XConfigureEvent *) event;
|
||||
- Screen *xscreen = gdk_x11_screen_get_xscreen (screen);
|
||||
|
||||
xscreen->width = rcevent->width;
|
||||
xscreen->height = rcevent->height;
|
||||
@@ -1212,9 +1212,12 @@ _gdk_x11_screen_size_changed (GdkScreen *screen,
|
||||
|
||||
process_monitors_change (screen);
|
||||
|
||||
- if (width != gdk_x11_screen_get_width (screen) ||
|
||||
- height != gdk_x11_screen_get_height (screen))
|
||||
+ if (width != xscreen->width ||
|
||||
+ height != xscreen->height)
|
||||
+ {
|
||||
+ process_monitors_change (screen);
|
||||
g_signal_emit_by_name (screen, "size-changed");
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.33.0
|
||||
|
||||
12
gtk3.spec
12
gtk3.spec
@ -14,7 +14,7 @@
|
||||
#Basic Information
|
||||
Name: gtk3
|
||||
Version: 3.24.30
|
||||
Release: 7
|
||||
Release: 8
|
||||
Summary: GTK+ graphical user interface library
|
||||
License: LGPLv2+
|
||||
URL: http://www.gtk.org
|
||||
@ -23,6 +23,10 @@ Source0: http://download.gnome.org/sources/gtk+/3.24/gtk+-%{version}.tar.xz
|
||||
Patch6000: remove-missing-reftests-when-use-meson-build-system.patch
|
||||
Patch6001: do-not-install-reftests-when-use-meson-build-system.patch
|
||||
Patch9000: delete-taboo-words.patch
|
||||
Patch6002: fix-add-function-definition-of-gtk-image-set-from-pi.patch
|
||||
Patch6003: fix-update-the-xscreen-size-when-x11-screen-change-s.patch
|
||||
Patch6004: fix-gtk3-always-send-the-monitors-changed-signal.patch
|
||||
Patch6005: fix-the-problem-that-the-prompt-information-of-netwo.patch
|
||||
|
||||
#Dependency
|
||||
BuildRequires: pkgconfig(atk) >= %{atk_version} pkgconfig(atk-bridge-2.0)
|
||||
@ -267,6 +271,12 @@ gtk-query-immodules-3.0-64 --update-cache &>/dev/null || :
|
||||
%{_mandir}/man1/gtk3-widget-factory.1*
|
||||
|
||||
%changelog
|
||||
* Mon Aug 21 2023 yangchenguang <yangchenguang@kylinsec.com.cn> - 3.24.30-8
|
||||
- Fix the problem that the prompt information of network icon volume icon is not displayed
|
||||
- update xscreen size when x11 screen size change
|
||||
- always send the monitors changed signal when screen size change
|
||||
- Add function definition of gtk_image_set_from_pixbuf_with_scale
|
||||
|
||||
* Thu Jun 15 2023 zhangpan <zhangpan103@h-partners.com> - 3.24.30-7
|
||||
- delete taboo words
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user