You are not logged in.

#26 2014-10-28 14:53:29

Dmitrii
Member
Registered: 2014-10-16
Posts: 19

Re: [Solved] huge windows after upgrade to gnome 3.14

jwhendy wrote:

@Dmitrii: really? Yeah, I got that part by now. My questions still stand:
- where is the file that requires overriding with gnome-settings-daemon?
- where is the file setting GDK_SCALE != 1 such that I need to edit /etc/environment override it?

I'm just trying to understand why these solutions don't work for some of us, but do work for you. So if we can start by looking at the common ground (say, a new 3.14 gnome file that features the line 'GDD_SCALE=2', I'll start to believe that /etc/environment has anything to do with this. Then again, a subset of us are just having issues with icons, so I don't even know if my issue is the same. Given that I can change my icon theme and my entire issue goes away, I don't think GdkWindowScalingFactor or GDK_SCALE have anything to do with me.

For the benefit of others, it would still be nice to understand why scaling is goofing. The gtk docs read to me like this shouldn't be messing up like it is (emphasis mine):

GDK_SCALE.  Must be set to an integer, typically 2. If set, GDK will scale all windows by the specified factor. Scaled output is meant to be used on high-dpi displays. Normally, GDK will pick up a suitable scale factor for each monitor from the display system. This environment variable allows to override that.

The docs don't suggest the user has to do anything, and by that I'd assume the default wouldn't make huge windows and icons for every gnome user.

Really and truly, you can ask yours questions  Alexander Larsson.

Last edited by Dmitrii (2014-10-28 20:06:30)

Offline

#27 2014-10-31 14:04:57

Dmitrii
Member
Registered: 2014-10-16
Posts: 19

Re: [Solved] huge windows after upgrade to gnome 3.14

jwhendy wrote:

@Dmitrii: really? Yeah, I got that part by now. My questions still stand:
- where is the file that requires overriding with gnome-settings-daemon?
- where is the file setting GDK_SCALE != 1 such that I need to edit /etc/environment override it?

I'm just trying to understand why these solutions don't work for some of us, but do work for you. So if we can start by looking at the common ground (say, a new 3.14 gnome file that features the line 'GDD_SCALE=2', I'll start to believe that /etc/environment has anything to do with this. Then again, a subset of us are just having issues with icons, so I don't even know if my issue is the same. Given that I can change my icon theme and my entire issue goes away, I don't think GdkWindowScalingFactor or GDK_SCALE have anything to do with me.

For the benefit of others, it would still be nice to understand why scaling is goofing. The gtk docs read to me like this shouldn't be messing up like it is (emphasis mine):

GDK_SCALE.  Must be set to an integer, typically 2. If set, GDK will scale all windows by the specified factor. Scaled output is meant to be used on high-dpi displays. Normally, GDK will pick up a suitable scale factor for each monitor from the display system. This environment variable allows to override that.

The docs don't suggest the user has to do anything, and by that I'd assume the default wouldn't make huge windows and icons for every gnome user.

look what i find

x11: Don't follow dpi and scale from xsettings when GDK_SCALE set
If things are hardcoded in the environment, that wins.
Diffstat
-rw-r--r--    gdk/x11/gdkscreen-x11.c    1   
-rw-r--r--    gdk/x11/gdkscreen-x11.h    1   
-rw-r--r--    gdk/x11/gdkwindow-x11.c    3   
-rw-r--r--    gdk/x11/xsettings-client.c    20   
4 files changed, 17 insertions, 8 deletions
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 46fc232..1efea05 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -1071,6 +1071,7 @@ _gdk_x11_screen_new (GdkDisplay *display,
#endif
   if (scale_str)
     {
+      x11_screen->fixed_window_scale = TRUE;
       x11_screen->window_scale = atol (scale_str);
       if (x11_screen->window_scale == 0)
         x11_screen->window_scale = 1;
diff --git a/gdk/x11/gdkscreen-x11.h b/gdk/x11/gdkscreen-x11.h
index f37b61a..ce8598e 100644
--- a/gdk/x11/gdkscreen-x11.h
+++ b/gdk/x11/gdkscreen-x11.h
@@ -48,6 +48,7 @@ struct _GdkX11Screen
   gint primary_monitor;

   gint window_scale;
+  gboolean fixed_window_scale;

   /* Xft resources for the display, used for default values for
    * the Xft/ XSETTINGS
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 6f8527d..49c1361 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -156,6 +156,7 @@ gdk_window_impl_x11_init (GdkWindowImplX11 *impl)

   impl->device_cursor = g_hash_table_new_full (NULL, NULL,
                                                NULL, g_object_unref);
+  impl->window_scale = 1;
}

GdkToplevelX11 *
@@ -1917,6 +1918,8 @@ _gdk_x11_window_set_window_scale (GdkWindow *window,
   if (window->window_type == GDK_WINDOW_OFFSCREEN)
     return;

+  g_print ("_gdk_x11_window_set_window_scale %p %d\n", window, scale);
+
   impl = GDK_WINDOW_IMPL_X11 (window->impl);

   impl->window_scale = scale;
diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c
index 475cbab..2d1c251 100644
--- a/gdk/x11/xsettings-client.c
+++ b/gdk/x11/xsettings-client.c
@@ -446,14 +446,17 @@ read_settings (GdkX11Screen *x11_screen,

   /* Since we support scaling we look at the specific Gdk/UnscaledDPI
      setting if it exists and use that instead of Xft/DPI if it is set */
-  setting = g_hash_table_lookup (x11_screen->xsettings, "gdk-unscaled-dpi");
-  if (setting)
+  if (x11_screen->xsettings && !x11_screen->fixed_window_scale)
     {
-      copy = g_new0 (GValue, 1);
-      g_value_init (copy, G_VALUE_TYPE (setting));
-      g_value_copy (setting, copy);
-      g_hash_table_insert (x11_screen->xsettings,
-               "gtk-xft-dpi", copy);
+      setting = g_hash_table_lookup (x11_screen->xsettings, "gdk-unscaled-dpi");
+      if (setting)
+    {
+      copy = g_new0 (GValue, 1);
+      g_value_init (copy, G_VALUE_TYPE (setting));
+      g_value_copy (setting, copy);
+      g_hash_table_insert (x11_screen->xsettings,
+                   "gtk-xft-dpi", copy);
+    }
     }

   if (do_notify)
@@ -462,7 +465,8 @@ read_settings (GdkX11Screen *x11_screen,
     g_hash_table_unref (old_list);

   g_value_init (&value, G_TYPE_INT);
-  if (gdk_screen_get_setting (GDK_SCREEN (x11_screen),
+  if (!x11_screen->fixed_window_scale &&
+      gdk_screen_get_setting (GDK_SCREEN (x11_screen),
                  "gdk-window-scaling-factor", &value))
     _gdk_x11_screen_set_window_scale (x11_screen,
                      g_value_get_int (&value));

Maybe  it will help  you if you afraid to ask Alexander Larsson. smile

Last edited by Dmitrii (2014-10-31 14:09:31)

Offline

#28 2014-10-31 15:03:38

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [Solved] huge windows after upgrade to gnome 3.14

@Dmitrii: First line:

x11: Don't follow dpi and scale from xsettings when GDK_SCALE set
If things are hardcoded in the environment, that wins.

So... if GDK_SCALE is set [==2], then ignore dpi/scale from xsettings unless environment overrides (i.e. the /etc/environment fix you suggested).

I don't see anything in those diff's that indicate GDK_SCALE ships with a default value of 2. So I'm still trying to understand why we need to override it to 1 via /etc/environment.

Also... looking at the actual files your diff post mentions... check out gdkscreen-x11.c in the gtk github account:

const char *scale_str;

[...]

#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
  scale_str = g_getenv ("GDK_SCALE");
#else
  scale_str = "1";
#endif
  if (scale_str)
    {
      x11_screen->fixed_window_scale = TRUE;
      x11_screen->window_scale = atol (scale_str);
      if (x11_screen->window_scale == 0)
        x11_screen->window_scale = 1;
    }
  else
    x11_screen->window_scale = 1;

I see that a couple lines are commented out, but while I don't know C, it looks like it checks the environment for GDK_SCALE, if it finds it, it sets scale_str to that value. Since I don't have it set, I fall into the else() of that if() code... and it's going to get set to 1. Not seeing anything set to 2.

I'm not afraid to ask anyone... I'd just like evidence for why these proposed fixes should work. So far, it's all about setting some variables to 1 when I haven't seen any evidence that they're set to anything other than that in the first place (not to mention they require installing a package I don't use, and /etc/environment doesn't work anyway).

From some other posts, it could just be something with the update and icon definitions for all I know.

Offline

#29 2014-10-31 19:46:23

Dmitrii
Member
Registered: 2014-10-16
Posts: 19

Re: [Solved] huge windows after upgrade to gnome 3.14

I'd just like evidence for why these proposed fixes should work. So far, it's all about setting some variables to 1 when I haven't seen any evidence that they're set to anything other than that in the first place (not to mention they require installing a package I don't use, and /etc/environment doesn't work anyway).

Looks like you already yourself answered your questions.

jwhendy wrote:

I'm on openbox and don't have  all gnome
I may actually have a different bug. My windows aren't huge

it is a little bit strange, you  don't have gnome nor huge windows, and you  came  in this thread and asking some sort evidence.

Offline

#30 2014-10-31 20:20:02

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [Solved] huge windows after upgrade to gnome 3.14

Well, I see this is going to end up most unproductive. From my previous post, including a screenshot to illustrate the problem:

jwhendy wrote:

I may actually have a different bug. My windows aren't huge, just my icons, and so far I've only noticed it in Evince... If this is a separate issue (huge icons in evince != huge windows), I'll start a new thread.

You were free to tell me back then to do so.

Fwiw, I tried to search specifically for icon-related threads when this started, which gets me to this thread and this one (and that one links here anyway). Others in the thread have chimed in about icon-related problems/solutions, so you can feel free to admonish them, too. I've tried to post whatever information I can in order to receive input, and am all for taking some flak if I've been following bad form for this forum (I don't think I have). You've provided some one-liners (which I took as rude) and some links/docs; requesting clarification/reasoning about them has me believing I'm basically being told to f-off now, which doesn't seem justified.

Offline

#31 2014-11-01 21:51:58

Dmitrii
Member
Registered: 2014-10-16
Posts: 19

Re: [Solved] huge windows after upgrade to gnome 3.14

jwhendy wrote:

Well, I see this is going to end up most unproductive. From my previous post, including a screenshot to illustrate the problem:

jwhendy wrote:

I may actually have a different bug. My windows aren't huge, just my icons, and so far I've only noticed it in Evince... If this is a separate issue (huge icons in evince != huge windows), I'll start a new thread.

You were free to tell me back then to do so.
.

To tell you the truth I was shocked  then your arrogance.
I had thought that htis is a some sort a joke, but now i see that i was wrong.
And I'd be more than happy to help you ( in the best of my ability and free time).
But i think that will be better to continue our  conversation  using  e -mail(if you have no objections).

Offline

#32 2014-11-03 11:36:58

tomasiek
Member
Registered: 2010-02-07
Posts: 3

Re: [Solved] huge windows after upgrade to gnome 3.14

In  index.theme of your icon theme (/usr/share/icons/[name of theme]/index.theme) change in all [ .... /scalable ] Size=.... to Size=16 and MinSize=... to MinSize=8 - that'ts work for me in xfce and Faenza-Xfce-Blue-Dark

Last edited by tomasiek (2014-11-03 11:57:35)

Offline

#33 2014-12-04 15:57:43

print
Member
Registered: 2007-02-27
Posts: 174

Re: [Solved] huge windows after upgrade to gnome 3.14

I am an Awesome-WM user who relies on gnome-settings-daemon and gnome-tweak-tool for decent-looking GTK apps (firefox, thunderbird, etc).

The upgrade to Gnome 3.14 resulted in 2 days of crazy looking (large) scaled fonts and icons.

Ultimately the only thing that worked for me was blasting the ~/.dconf directory and restarting gnome-settings-daemon.


% whereis whatis whence which whoami whois who

Offline

#34 2014-12-23 23:51:06

Dmitrii
Member
Registered: 2014-10-16
Posts: 19

Re: [Solved] huge windows after upgrade to gnome 3.14

jwhendy wrote:

I may actually have a different bug. My windows aren't huge, just my icons, and so far I've only noticed it in Evince... If this is a separate issue (huge icons in evince != huge windows), I'll start a new thread.


But i think that will be better to continue our  conversation  using  e -mail(if you have no objections).

Well after  "using  e -mail" he immediately lost interest in the problem.
Local FAT Troll.

Last edited by Dmitrii (2015-03-03 15:31:40)

Offline

#35 2014-12-24 10:08:32

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [Solved] huge windows after upgrade to gnome 3.14

@Dmitrii I emailed you through the forum probably a month ago. Did you respond?

I'm not sure what your point is above, and we're still at the same place. The solutions here didn't help and no answers to my request for justification were provided. Only changing my icon theme worked, so I'm a happy camper. Haven't thought about you in forever. You on the other hand appear to be digging up old posts to harass me (yeah, I saw the other one, and if you'd read more carefully you'd have seen that the cleaning didn't help...).

Offline

#36 2014-12-24 16:55:37

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,791

Re: [Solved] huge windows after upgrade to gnome 3.14


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#37 2015-04-14 02:23:04

solar
Member
Registered: 2011-03-01
Posts: 77

Re: [Solved] huge windows after upgrade to gnome 3.14

Hehe.. I think Dmitrii, you have to understand your translator is really bad to use from English to your language and vice versa. One post I think seemed you wished to say something nice and helpful but it came out sounding very bad!

So literally.. lost in translation ,p

Anyway... for those which have noticed, in some environments overrides in gconf, or environment helps due to there being functions dealing with this. At a lower level (or more direct rather) lies the crux for the issue, which is the index.theme definitions. It's that simple.

By using some grep,sed what not you can automate this, but in some cases there isn't already set values, so needs appending, others can be replaced by some values.

eg. in my icon set I have to add to the Scalable section (I did a s/scalable/Scalable/g, didn't work although for some environment it apparently did). If you cba to go through a gazillion themes, take the icon set you DO like though, open the file, compare it to a working one and/or add the needed stuff.

I had something like


[128x128/actions]
Size=128
Context=Actions
Type=Scalable

Changed to (added)
[128x128/actions]
Size=128
Context=Actions
Type=Scalable
MinSize=8
MaxSize=128

And things in openbox/lxde or appas like nemo? etc now worked.
EDIT: ye, seems like the solution is to make sure that index.themes files with Scalable sections have to have a MinSize and MaxSize value which should be set to MinSize=8 and MaxSize probably the size of the defined icons.

(Do a backup of your index files before you start changing the world, squire!).

Tip 1: Changing MinSize values

sudo find /usr/share/icons/ -type f -iname "index.theme" -exec sed -i 's/\(MinSize=\)\(.*\)/\18/g' {} \;
(and any other paths with .icons)

Tip 2: don't use sudo in local paths, just systempaths.

Tip 3: Don't forget to possibly add the MaxSize though (prolly gonna be a bit manual unfortunately).

Last edited by solar (2015-04-14 02:38:43)


I am hilariously insane. yup. you won't notice though.. I promise...I think.

Offline

#38 2015-09-03 16:01:51

Dmitrii
Member
Registered: 2014-10-16
Posts: 19

Re: [Solved] huge windows after upgrade to gnome 3.14

"Hehe.. I think Dmitrii, you have to understand your translator is really bad to use from English to your language and vice versa. One post I think seemed you wished to say something nice and helpful but it came out sounding very bad!"
solar  what exactly you can t  understand? Anyway you  only one  who complain.  @ translator is really bad@
And  yes "Hehe" so stupid trolling never  saw  before.
Very strange behavior of the moderator,  it seems he is guided by the slogan "jedem das seine" .

Last edited by Dmitrii (2015-10-02 09:42:30)

Offline

Board footer

Powered by FluxBB