Merge pull request #9587 from 4fury-c3440d8/np

exfatprogs, nocsd.
This commit is contained in:
Rmys
2021-06-23 15:23:24 +03:00
committed by GitHub
4 changed files with 157 additions and 3 deletions
@@ -0,0 +1,118 @@
--- a/gtk3-nocsd.c 2021-06-20 20:00:03.152211973 +0300
+++ b/gtk3-nocsd.c 2021-06-20 20:01:19.163214406 +0300
@@ -128,7 +128,6 @@
// return FALSE temporarily. Then, client-side decoration (CSD) cannot be initialized.
volatile int disable_composite;
volatile int signal_capture_handler;
- volatile int fake_global_decoration_layout;
volatile int in_info_collect;
const char *volatile signal_capture_name;
volatile gpointer signal_capture_instance;
@@ -300,7 +299,6 @@
RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRARY, g_type_check_instance_is_fundamentally_a, gboolean, (GTypeInstance *instance, GType fundamental_type), (instance, fundamental_type))
RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRARY, g_signal_connect_data, gulong, (gpointer instance, const gchar *detailed_signal, GCallback c_handler, gpointer data, GClosureNotify destroy_data, GConnectFlags connect_flags), (instance, detailed_signal, c_handler, data, destroy_data, connect_flags))
RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRARY, g_signal_handlers_disconnect_matched, guint, (gpointer instance, GSignalMatchType mask, guint signal_id, GQuark detail, GClosure *closure, gpointer func, gpointer data), (instance, mask, signal_id, detail, closure, func, data))
-RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRARY, g_object_get_valist, void, (GObject *object, const gchar *first_property_name, va_list var_args), (object, first_property_name, var_args))
RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRARY, g_object_get_property, void, (GObject *object, const gchar *property_name, GValue *value), (object, property_name, value))
RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRARY, g_value_init, GValue *, (GValue *value, GType g_type), (value, g_type))
RUNTIME_IMPORT_FUNCTION(0, GOBJECT_LIBRARY, g_value_unset, void, (GValue *value), (value))
@@ -356,7 +354,6 @@
#define g_type_check_instance_is_a rtlookup_g_type_check_instance_is_a
#define g_type_check_instance_cast rtlookup_g_type_check_instance_cast
#define g_object_class_find_property rtlookup_g_object_class_find_property
-#define g_object_get_valist rtlookup_g_object_get_valist
#define g_object_get_property rtlookup_g_object_get_property
#ifdef g_object_ref
# undef g_object_ref
@@ -743,14 +740,10 @@
r = _remove_buttons_from_layout (new_layout, *decoration_layout_ptr);
if (r == 0)
*decoration_layout_ptr = new_layout;
- } else {
- TLSD->fake_global_decoration_layout = 1;
}
info.update_window_buttons (bar);
if (*decoration_layout_ptr) {
*decoration_layout_ptr = orig_layout;
- } else {
- TLSD->fake_global_decoration_layout = 0;
}
}
@@ -803,43 +796,43 @@
* g_object_get(). */
va_start (var_args, first_property_name);
- if (G_UNLIKELY (TLSD->fake_global_decoration_layout)) {
- name = first_property_name;
- while (name) {
- GValue value = G_VALUE_INIT;
- GParamSpec *spec = g_object_class_find_property (G_OBJECT_GET_CLASS (object), name);
- gchar *error;
-
- if (!spec)
+ name = first_property_name;
+ while (name) {
+ GValue value = G_VALUE_INIT;
+ GParamSpec *spec = g_object_class_find_property (G_OBJECT_GET_CLASS (object), name);
+ gchar *error;
+
+ if (!spec)
+ break;
+
+ g_value_init (&value, spec->value_type);
+ g_object_get_property (object, name, &value);
+
+ if (G_UNLIKELY (strcmp (name, "gtk-decoration-layout") == 0)) {
+ gchar **v = va_arg (var_args, gchar **);
+ const gchar *s = g_value_get_string (&value);
+
+ r = _remove_buttons_from_layout (new_layout, s);
+ if (r == 0)
+ s = new_layout;
+ *v = g_strdup (s);
+ } else if (G_UNLIKELY (strcmp (name, "gtk-dialogs-use-header") == 0)) {
+ gboolean *v = va_arg (var_args, gboolean *);
+ // Save dialog will break if this prop has been set to TRUE (see #13)
+ *v = FALSE;
+ } else {
+ G_VALUE_LCOPY (&value, var_args, 0, &error);
+ if (error) {
+ g_warning ("%s: %s", "g_object_get_valist", error);
+ g_free (error);
+ g_value_unset (&value);
break;
-
- g_value_init (&value, spec->value_type);
- g_object_get_property (object, name, &value);
-
- if (G_UNLIKELY (strcmp (name, "gtk-decoration-layout") == 0)) {
- gchar **v = va_arg (var_args, gchar **);
- const gchar *s = g_value_get_string (&value);
-
- r = _remove_buttons_from_layout (new_layout, s);
- if (r == 0)
- s = new_layout;
- *v = g_strdup (s);
- } else {
- G_VALUE_LCOPY (&value, var_args, 0, &error);
- if (error) {
- g_warning ("%s: %s", "g_object_get_valist", error);
- g_free (error);
- g_value_unset (&value);
- break;
- }
}
+ }
- g_value_unset (&value);
+ g_value_unset (&value);
- name = va_arg (var_args, gchar *);
- }
- } else {
- g_object_get_valist (object, first_property_name, var_args);
+ name = va_arg (var_args, gchar *);
}
va_end (var_args);
}
@@ -0,0 +1,25 @@
From e70d519db7c6aeeea79cbb4a78a204ebc91be6f8 Mon Sep 17 00:00:00 2001
From: Yaroslav Sidlovsky <zawertun@gmail.com>
Date: Fri, 18 Jun 2021 02:30:10 +0300
Subject: [PATCH] Fix for black borders around some application windows
---
gtk3-nocsd.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gtk3-nocsd.c b/gtk3-nocsd.c
index 94e1bbe..f1d3176 100644
--- a/gtk3-nocsd.c
+++ b/gtk3-nocsd.c
@@ -871,6 +871,11 @@ extern void gtk_header_bar_set_decoration_layout (GtkHeaderBar *bar, const gchar
}
}
+extern gboolean gtk_window_get_decorated (GtkWindow *window)
+{
+ return FALSE;
+}
+
extern gboolean gdk_screen_is_composited (GdkScreen *screen) {
/* With Gtk+3 3.16.1+ we reimplement gtk_window_set_titlebar ourselves, hence
* we don't want to re-use the compositing hack, especially since it causes
+5 -1
View File
@@ -20,6 +20,10 @@
<Dependency>gtk3-devel</Dependency>
<Dependency>gobject-introspection-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level='1'>Always_override_property_gtk-decoration-layout.patch</Patch>
<Patch level='1'>Fix_for_black_borders_around_some_application_windows.patch</Patch>
</Patches>
</Source>
<Package>
@@ -38,7 +42,7 @@
<History>
<Update release="1">
<Date>2021-03-14</Date>
<Date>2021-06-23</Date>
<Version>3.0.4</Version>
<Comment>First Beta release.</Comment>
<Name>fury</Name>
+9 -2
View File
@@ -13,8 +13,8 @@
<PartOf>hardware.disk</PartOf>
<Summary>exFAT filesystem userspace utilities.</Summary>
<Description>As new exfat filesystem is merged into linux-5.7 kernel, exfatprogs is created as an official userspace utilities that contain all of the standard utilities for creating and fixing and debugging exfat filesystem in linux system.</Description>
<Archive sha1sum="dc8d5c361695d4c7b586c4d8fb6286cfb86df1f6" type="tarxz">
https://github.com/exfatprogs/exfatprogs/releases/download/1.1.1/exfatprogs-1.1.1.tar.xz
<Archive sha1sum="d206279698f74fe526abff39f0d76983a7d9e71c" type="tarxz">
https://github.com/exfatprogs/exfatprogs/releases/download/1.1.2/exfatprogs-1.1.2.tar.xz
</Archive>
<BuildDependencies>
<!-- <Dependency></Dependency> -->
@@ -37,6 +37,13 @@
</Package>
<History>
<Update release="4">
<Date>2021-06-22</Date>
<Version>1.1.2</Version>
<Comment>Version bump.</Comment>
<Name>fury</Name>
<Email>uglyside@yandex.ru</Email>
</Update>
<Update release="3">
<Date>2021-05-04</Date>
<Version>1.1.1</Version>