Update to 3.17.91

This commit is contained in:
Kalev Lember 2015-08-31 20:56:57 +02:00
parent 102c0c22a5
commit e39d664389
4 changed files with 7 additions and 120 deletions

1
.gitignore vendored
View File

@ -66,3 +66,4 @@ gnome-system-monitor-2.28.1.tar.bz2
/gnome-system-monitor-3.17.3.tar.xz /gnome-system-monitor-3.17.3.tar.xz
/gnome-system-monitor-3.17.4.tar.xz /gnome-system-monitor-3.17.4.tar.xz
/gnome-system-monitor-3.17.90.tar.xz /gnome-system-monitor-3.17.90.tar.xz
/gnome-system-monitor-3.17.91.tar.xz

View File

@ -1,109 +0,0 @@
From 0efbc16b6e3c765e3e7ab0fa55b94489a3151be6 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Sat, 22 Aug 2015 20:19:05 -0400
Subject: [PATCH] Work under wayland even when built with wnck
There is really no need to ask libwnck for X resource consumption
when the display we are using is not an X display. This makes
gnome-system-monitor work under Wayland, even when the X resource
support is compiled in.
https://bugzilla.gnome.org/show_bug.cgi?id=753972
---
configure.ac | 2 +-
src/prettytable.cpp | 17 ++++++++++++-----
src/proctable.cpp | 20 +++++++++++++++-----
3 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index 39bf5f5..32d1682 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,7 +57,7 @@ AC_PATH_PROG(DESKTOP_FILE_VALIDATE, desktop-file-validate)
AC_ARG_ENABLE(wnck, AS_HELP_STRING([--enable-wnck], [enable wnck support]),enable_wnck="$enableval",enable_wnck=no)
if test "x$enable_wnck" != "xno"; then
- PKG_CHECK_MODULES(WNCK, libwnck-3.0 >= $LIBWNCK_REQUIRED)
+ PKG_CHECK_MODULES(WNCK, libwnck-3.0 >= $LIBWNCK_REQUIRED gdk-x11-3.0)
AC_DEFINE(HAVE_WNCK, 1, [Define if libwnck is available])
fi
AM_CONDITIONAL(HAVE_WNCK, [test "enable_wnck" = "yes"])
diff --git a/src/prettytable.cpp b/src/prettytable.cpp
index cb1f3bb..0d5e0bb 100644
--- a/src/prettytable.cpp
+++ b/src/prettytable.cpp
@@ -24,6 +24,9 @@
#include "proctable.h"
#include "util.h"
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+#endif
namespace
{
@@ -34,11 +37,15 @@ namespace
PrettyTable::PrettyTable()
{
#ifdef HAVE_WNCK
- WnckScreen* screen = wnck_screen_get_default();
- g_signal_connect(G_OBJECT(screen), "application_opened",
- G_CALLBACK(PrettyTable::on_application_opened), this);
- g_signal_connect(G_OBJECT(screen), "application_closed",
- G_CALLBACK(PrettyTable::on_application_closed), this);
+#ifdef GDK_WINDOWING_X11
+ if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) {
+ WnckScreen* screen = wnck_screen_get_default();
+ g_signal_connect(G_OBJECT(screen), "application_opened",
+ G_CALLBACK(PrettyTable::on_application_opened), this);
+ g_signal_connect(G_OBJECT(screen), "application_closed",
+ G_CALLBACK(PrettyTable::on_application_closed), this);
+ }
+#endif
#endif
// init GIO apps cache
diff --git a/src/proctable.cpp b/src/proctable.cpp
index 2caeaf2..ee3d6df 100644
--- a/src/proctable.cpp
+++ b/src/proctable.cpp
@@ -59,6 +59,10 @@
#include "treeview.h"
#include "systemd.h"
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+#endif
+
ProcInfo::UserMap ProcInfo::users;
ProcInfo::List ProcInfo::all;
std::map<pid_t, guint64> ProcInfo::cpu_times;
@@ -715,14 +719,20 @@ static void
get_process_memory_info(ProcInfo *info)
{
glibtop_proc_mem procmem;
+
#ifdef HAVE_WNCK
- WnckResourceUsage xresources;
+ info->memxserver = 0;
+#ifdef GDK_WINDOWING_X11
+ if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) {
+ WnckResourceUsage xresources;
- wnck_pid_read_resource_usage (gdk_screen_get_display (gdk_screen_get_default ()),
- info->pid,
- &xresources);
+ wnck_pid_read_resource_usage (gdk_display_get_default (),
+ info->pid,
+ &xresources);
- info->memxserver = xresources.total_bytes_estimate;
+ info->memxserver = xresources.total_bytes_estimate;
+ }
+#endif
#endif
glibtop_get_proc_mem(&procmem, info->pid);
--
2.5.0

View File

@ -6,17 +6,14 @@
Summary: Process and resource monitor Summary: Process and resource monitor
Name: gnome-system-monitor Name: gnome-system-monitor
Version: 3.17.90 Version: 3.17.91
Release: 2%{?dist} Release: 1%{?dist}
License: GPLv2+ License: GPLv2+
Group: Applications/System Group: Applications/System
URL: http://www.gnome.org/ URL: http://www.gnome.org/
#VCS: git:git://git.gnome.org/gnome-system-monitor #VCS: git:git://git.gnome.org/gnome-system-monitor
Source: http://download.gnome.org/sources/%{name}/3.17/%{name}-%{version}.tar.xz Source: http://download.gnome.org/sources/%{name}/3.17/%{name}-%{version}.tar.xz
# https://bugzilla.gnome.org/show_bug.cgi?id=753972
Patch0: 0001-Work-under-wayland-even-when-built-with-wnck.patch
BuildRequires: pkgconfig(libgtop-2.0) >= %{libgtop2_version} BuildRequires: pkgconfig(libgtop-2.0) >= %{libgtop2_version}
BuildRequires: pkgconfig(libwnck-3.0) >= %{libwnck_version} BuildRequires: pkgconfig(libwnck-3.0) >= %{libwnck_version}
BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(gtk+-3.0)
@ -28,12 +25,9 @@ BuildRequires: desktop-file-utils
BuildRequires: intltool gettext BuildRequires: intltool gettext
BuildRequires: itstool BuildRequires: itstool
BuildRequires: gnome-common autoconf automake libtool
# for file triggers # for file triggers
Requires: glib2 >= 2.45.4-2 Requires: glib2 >= 2.45.4-2
%description %description
gnome-system-monitor allows to graphically view and manipulate the running gnome-system-monitor allows to graphically view and manipulate the running
processes on your system. It also provides an overview of available resources processes on your system. It also provides an overview of available resources
@ -41,10 +35,8 @@ such as CPU and memory.
%prep %prep
%setup -q %setup -q
%patch0 -p1
%build %build
autoreconf -i -f
%configure --enable-systemd --enable-wnck %configure --enable-systemd --enable-wnck
make %{?_smp_mflags} make %{?_smp_mflags}
@ -70,6 +62,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/gnome-system-monit
%{_libexecdir}/gnome-system-monitor/gsm-* %{_libexecdir}/gnome-system-monitor/gsm-*
%changelog %changelog
* Mon Aug 31 2015 Kalev Lember <klember@redhat.com> - 3.17.91-1
- Update to 3.17.91
* Sat Aug 22 2015 Matthias Clasen <mclasen@redhat.com> - 3.17.90-2 * Sat Aug 22 2015 Matthias Clasen <mclasen@redhat.com> - 3.17.90-2
- Work under Wayland - Work under Wayland
- Rely on file triggers - Rely on file triggers

View File

@ -1 +1 @@
a7e5c0e4d5886cc17c832cc81430b9b2 gnome-system-monitor-3.17.90.tar.xz 2a7588840f13968e63c4620d353d2339 gnome-system-monitor-3.17.91.tar.xz