summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2001-09-17 14:14:18 +0000
committerGeorge Lebl <jirka@src.gnome.org>2001-09-17 14:14:18 +0000
commit5e98efd97d7321d806d38d98d76145bb2e632bfa (patch)
tree2b07d01b313c5eec0ec8664c9d04fbf5127ac35a
parentf45c8797ab4f9c8f6bfbe57df032738b022588ed (diff)
downloadgdm-5e98efd97d7321d806d38d98d76145bb2e632bfa.tar.gz
fix crash when quiver would happen while iconized
Mon Sep 17 07:17:32 2001 George Lebl <jirka@5z.com> * gui/gdmlogin.c: fix crash when quiver would happen while iconized * daemon/misc.c: include signal.h * gui/gdmlogin.c: don't go nuts on just minor version change, only tell the user to piss of when the greeter protocol version changed.
-rw-r--r--ChangeLog10
-rw-r--r--daemon/misc.c1
-rw-r--r--gui/gdmlogin.c22
3 files changed, 28 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 545c9e55..47c473f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Mon Sep 17 07:17:32 2001 George Lebl <jirka@5z.com>
+
+ * gui/gdmlogin.c: fix crash when quiver would happen while
+ iconized
+
+ * daemon/misc.c: include signal.h
+
+ * gui/gdmlogin.c: don't go nuts on just minor version change, only
+ tell the user to piss of when the greeter protocol version changed.
+
Thu Sep 13 00:20:46 2001 George Lebl <jirka@5z.com>
* gui/gdmlogin.c: Apply patch from Ali Akcaagac
diff --git a/daemon/misc.c b/daemon/misc.c
index f3363414..e1ba1351 100644
--- a/daemon/misc.c
+++ b/daemon/misc.c
@@ -19,6 +19,7 @@
#include "config.h"
#include <gnome.h>
#include <syslog.h>
+#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
diff --git a/gui/gdmlogin.c b/gui/gdmlogin.c
index aecf5486..a8d663bb 100644
--- a/gui/gdmlogin.c
+++ b/gui/gdmlogin.c
@@ -2072,7 +2072,10 @@ gdm_login_ctrl_handler (GIOChannel *source, GIOCondition cond, gint fd)
break;
case GDM_RESET:
- if (GdmQuiver) {
+ if (GdmQuiver &&
+ login->window != NULL &&
+ icon_win == NULL &&
+ GTK_WIDGET_VISIBLE (login)) {
Window lw = GDK_WINDOW_XWINDOW (login->window);
gdm_wm_get_window_pos (lw, &x, &y);
@@ -2461,7 +2464,7 @@ create_handle (void)
TRUE, TRUE, GNOME_PAD_SMALL);
if (GdmIcon != NULL) {
- if (access (GdmIcon, R_OK)) {
+ if (access (GdmIcon, R_OK) != 0) {
syslog (LOG_WARNING, _("Can't open icon file: %s. Suspending iconify feature!"), GdmIcon);
} else {
GtkWidget *icon;
@@ -3510,6 +3513,7 @@ main (int argc, char *argv[])
sigset_t mask;
GIOChannel *ctrlch;
char *gdm_version;
+ char *gdm_protocol_version;
if (g_getenv ("DOING_GDM_DEVELOPMENT") != NULL)
DOING_GDM_DEVELOPMENT = TRUE;
@@ -3550,10 +3554,14 @@ main (int argc, char *argv[])
gdm_wm_screen_init (GdmXineramaScreen);
gdm_version = g_getenv ("GDM_VERSION");
+ gdm_protocol_version = g_getenv ("GDM_GREETER_PROTOCOL_VERSION");
if ( ! DOING_GDM_DEVELOPMENT &&
- (gdm_version == NULL ||
- strcmp (gdm_version, VERSION) != 0) &&
+ ((gdm_protocol_version != NULL &&
+ strcmp (gdm_protocol_version, GDM_GREETER_PROTOCOL_VERSION) != 0) ||
+ (gdm_protocol_version == NULL &&
+ (gdm_version == NULL ||
+ strcmp (gdm_version, VERSION) != 0))) &&
ve_string_empty (g_getenv ("GDM_IS_LOCAL"))) {
char *msg;
GtkWidget *dialog;
@@ -3581,6 +3589,7 @@ main (int argc, char *argv[])
}
if ( ! DOING_GDM_DEVELOPMENT &&
+ gdm_protocol_version == NULL &&
gdm_version == NULL) {
char *msg;
GtkWidget *dialog;
@@ -3615,7 +3624,10 @@ main (int argc, char *argv[])
}
if ( ! DOING_GDM_DEVELOPMENT &&
- strcmp (gdm_version, VERSION) != 0) {
+ ((gdm_protocol_version != NULL &&
+ strcmp (gdm_protocol_version, GDM_GREETER_PROTOCOL_VERSION) != 0) ||
+ (gdm_protocol_version == NULL &&
+ strcmp (gdm_version, VERSION) != 0))) {
char *msg;
GtkWidget *dialog;