Commit 8252a458e77e9935021c5abf1238dd3e0b78f43c

Authored by Perry Werneck
1 parent 05d491d3

CSD is disabled as default on windows.

schemas/windows/application.gschema.xml.in
... ... @@ -39,7 +39,7 @@
39 39 </key>
40 40  
41 41 <key name="gtk-csd" type="i">
42   - <default>-1</default>
  42 + <default>0</default>
43 43 <summary>GTK CSD</summary>
44 44 <description>Gtk Client side decorations</description>
45 45 </key>
... ...
src/objects/application/application.c
... ... @@ -35,6 +35,7 @@
35 35 #include <pw3270.h>
36 36 #include <pw3270/application.h>
37 37 #include <pw3270/actions.h>
  38 + #include <stdlib.h>
38 39  
39 40 enum {
40 41 PROP_ZERO,
... ... @@ -207,19 +208,23 @@
207 208  
208 209 g_settings_schema_source_unref(source);
209 210  
210   - // https://stackoverflow.com/questions/37035936/how-to-get-native-windows-decorations-on-gtk3-on-windows-7-and-msys2
211   - int gtk_csd = g_settings_get_int(app->settings,"gtk-csd");
212   - if(gtk_csd != -1) {
213   - g_autofree gchar * env = g_strdup_printf("GTK_CSD=%d",gtk_csd);
214   - putenv(env);
215   - }
216   -
217 211 #else
218 212  
219 213 app->settings = g_settings_new_with_path("br.com.bb." PACKAGE_NAME, path);
220 214  
221 215 #endif // DEBUG
222 216  
  217 +#ifdef _WIN32
  218 + {
  219 + // https://stackoverflow.com/questions/37035936/how-to-get-native-windows-decorations-on-gtk3-on-windows-7-and-msys2
  220 + int gtk_csd = g_settings_get_int(app->settings,"gtk-csd");
  221 + if(gtk_csd != -1) {
  222 + g_autofree gchar * env = g_strdup_printf("GTK_CSD=%d",gtk_csd);
  223 + putenv(env);
  224 + }
  225 + }
  226 +#endif // _WIN32
  227 +
223 228 debug("app->settings=%p",app->settings);
224 229  
225 230 }
... ...