[recipes] Make dialogs non-resizable on OS X
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Make dialogs non-resizable on OS X
- Date: Mon, 6 Mar 2017 03:45:50 +0000 (UTC)
commit f1ed3254ccf5015222647a5c80d37867efcedf52
Author: Matthias Clasen <mclasen Matthiass-MBP home>
Date: Sun Mar 5 22:43:16 2017 -0500
Make dialogs non-resizable on OS X
On platforms where we use traditional window decorations
for dialogs, we need to convince the wm to now make
dialogs minimizable and maximizable.
src/gr-about-dialog.c | 4 ++++
src/gr-chef-dialog.c | 4 ++++
src/gr-window.c | 5 +++++
3 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-about-dialog.c b/src/gr-about-dialog.c
index 27541e8..1f6194b 100644
--- a/src/gr-about-dialog.c
+++ b/src/gr-about-dialog.c
@@ -878,5 +878,9 @@ gr_about_dialog_new (void)
add_built_logo (about);
add_system_tab (about);
+ gtk_widget_realize (GTK_WIDGET (about));
+ gdk_window_set_functions (gtk_widget_get_window (GTK_WIDGET (about)),
+ GDK_FUNC_ALL | GDK_FUNC_MINIMIZE | GDK_FUNC_MAXIMIZE);
+
return about;
}
diff --git a/src/gr-chef-dialog.c b/src/gr-chef-dialog.c
index f2081ba..08da23d 100644
--- a/src/gr-chef-dialog.c
+++ b/src/gr-chef-dialog.c
@@ -479,6 +479,10 @@ gr_chef_dialog_new (GrChef *chef,
"use-header-bar", use_header_bar,
NULL);
+ gtk_widget_realize (GTK_WIDGET (dialog));
+ gdk_window_set_functions (gtk_widget_get_window (GTK_WIDGET (dialog)),
+ GDK_FUNC_ALL | GDK_FUNC_MINIMIZE | GDK_FUNC_MAXIMIZE);
+
gr_chef_dialog_set_chef (dialog, chef);
gr_chef_dialog_can_create (dialog, create);
diff --git a/src/gr-window.c b/src/gr-window.c
index 9c74b26..1fc4579 100644
--- a/src/gr-window.c
+++ b/src/gr-window.c
@@ -1203,6 +1203,11 @@ gr_window_show_news (GrWindow *window)
builder = gtk_builder_new_from_resource ("/org/gnome/Recipes/recipe-whats-new-dialog.ui");
dialog = GTK_WINDOW (gtk_builder_get_object (builder, "dialog"));
gtk_window_set_transient_for (dialog, GTK_WINDOW (window));
+
+ gtk_widget_realize (GTK_WIDGET (dialog));
+ gdk_window_set_functions (gtk_widget_get_window (GTK_WIDGET (dialog)),
+ GDK_FUNC_ALL | GDK_FUNC_MINIMIZE | GDK_FUNC_MAXIMIZE);
+
box = GTK_WIDGET (gtk_builder_get_object (builder, "box"));
for (i = 0; i < news->len; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]