gdm/gdm-2.18.0-add-lowres-fix.patch

93 lines
2.9 KiB
Diff

--- 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