- add fix to allow themes to cope with low resolution modes better (bug

232672)
This commit is contained in:
Ray Strode 2007-03-20 16:57:22 +00:00
parent b6650ac889
commit ba55296a91
2 changed files with 100 additions and 1 deletions

View File

@ -0,0 +1,92 @@
--- gdm-2.18.0/gui/greeter/greeter_item.c.add-lowres-fix 2007-03-11 17:46:10.000000000 -0400
+++ gdm-2.18.0/gui/greeter/greeter_item.c 2007-03-20 12:13:24.000000000 -0400
@@ -26,6 +26,7 @@
#include <unistd.h>
#include "gdm.h"
+#include "gdmwm.h"
#include "gdmconfig.h"
#include "gdmcommon.h"
#include "misc.h"
@@ -181,6 +182,10 @@
! (info->show_modes & GREETER_ITEM_SHOW_REMOTE))
return FALSE;
+ if ((gdm_wm_screen.width < info->minimum_required_screen_width) ||
+ (gdm_wm_screen.height < info->minimum_required_screen_height))
+ return FALSE;
+
sysmenu = gdm_config_get_bool (GDM_KEY_SYSTEM_MENU);
if (( ! gdm_config_get_bool (GDM_KEY_CONFIG_AVAILABLE) ||
--- gdm-2.18.0/gui/greeter/greeter_parser.c.add-lowres-fix 2007-03-20 12:13:24.000000000 -0400
+++ gdm-2.18.0/gui/greeter/greeter_parser.c 2007-03-20 12:45:26.000000000 -0400
@@ -27,6 +27,7 @@
#include <gdk/gdkx.h>
#include <locale.h>
#include <glib/gi18n.h>
+#include <syslog.h>
#include "gdmwm.h"
#include "gdmcommon.h"
@@ -597,7 +598,23 @@
}
xmlFree (prop);
}
-
+
+ prop = xmlGetProp (node,(const xmlChar *) "min-screen-width");
+ if (prop != NULL)
+ {
+ syslog (LOG_ERR, "minimum width is %d", info->minimum_required_screen_height);
+ info->minimum_required_screen_width = atoi ((char *) prop);
+ xmlFree (prop);
+ }
+
+ prop = xmlGetProp (node,(const xmlChar *) "min-screen-height");
+ if (prop != NULL)
+ {
+ info->minimum_required_screen_height = atoi ((char *) prop);
+ syslog (LOG_ERR, "minimum height is %d", info->minimum_required_screen_height);
+ xmlFree (prop);
+ }
+
prop = xmlGetProp (node,(const xmlChar *) "modes");
if (prop != NULL)
{
--- gdm-2.18.0/gui/greeter/greeter_item.h.add-lowres-fix 2007-03-20 12:13:24.000000000 -0400
+++ gdm-2.18.0/gui/greeter/greeter_item.h 2007-03-20 12:13:24.000000000 -0400
@@ -89,6 +89,10 @@
float y;
float width;
float height;
+
+ int minimum_required_screen_width;
+ int minimum_required_screen_height;
+
GreeterItemPosType x_type:2;
GreeterItemPosType y_type:2;
GreeterItemSizeType width_type:4;
--- gdm-2.18.0/docs/C/gdm.xml.add-lowres-fix 2007-03-20 12:53:33.000000000 -0400
+++ gdm-2.18.0/docs/C/gdm.xml 2007-03-20 12:56:20.000000000 -0400
@@ -6544,6 +6544,20 @@
</para>
<para>
+ Alternatively, you can specify a &quot;min-screen-width&quot; or
+ &quot;min-screen-height&quot; value to indicate that certain
+ items should only be displayed if the screen resolution is the
+ at least the given required size.
+ </para>
+
+ <para>
+ For example:
+<screen>
+&lt;show min-screen-height=&quot;768&quot;/&gt;
+</screen>
+ </para>
+
+ <para>
Note that if SystemMenu is off then the halt, restart, suspend,
chooser and config choices will not be shown, so this is a global
toggle for them all. See some of the standard themes for how the

View File

@ -16,7 +16,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.18.0
Release: 4%{?dist}
Release: 5%{?dist}
Epoch: 1
License: LGPL/GPL
Group: User Interface/X
@ -64,6 +64,8 @@ Patch32: gdm-2.17.8-a11y-fixes-for-themed-greeter.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=411501
Patch33: gdm-2.17.7-pass-at-to-session-4.patch
Patch34: gdm-2.18.0-add-lowres-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Prereq: /usr/sbin/useradd
@ -148,6 +150,7 @@ Extra icons / faces for the GNOME Display Manager.
%patch31 -p1 -b .hide-uninstalled-languages
%patch32 -p0 -b .a11y-fixes
%patch33 -p0 -b .pass-ats-to-session
%patch34 -p1 -b .add-lowres-fix
%build
cp -f %{SOURCE1} config/gdm
@ -365,6 +368,10 @@ fi
%{_datadir}/pixmaps/faces/extras/*.jpg
%changelog
* Tue Mar 20 2007 Ray Strode <rstrode@redhat.com> - 1:2.18.0-5
- add fix to allow themes to cope with low resolution modes
better (bug 232672)
* Mon Mar 19 2007 Ray Strode <rstrode@redhat.com> - 1:2.18.0-4
- update and reenable security token patch