diff -u gnome-power-manager-0.3.4/src/gpm-manager.c gnome-power-manager-0.3.4/src/gpm-manager.c
--- gnome-power-manager-0.3.4/src/gpm-manager.c
+++ gnome-power-manager-0.3.4/src/gpm-manager.c
@@ -551,7 +551,12 @@
 
 	if (strcmp (action, ACTION_NOTHING) == 0) {
 		g_debug ("*ACTION* Doing nothing");
-
+		
+	} else if (strcmp (action, ACTION_LOCK) == 0) {
+		g_debug ("*ACTION* Lock");
+		
+		gpm_manager_lock (manager);
+		
 	} else if (strcmp (action, ACTION_SUSPEND) == 0) {
 		g_debug ("*ACTION* Suspend");
 
@@ -823,6 +828,17 @@
 	}
 }
 
+/** Do a screenlock
+ *
+ *  @note
+ *	- Always tries to locks the screen
+ */
+void
+gpm_manager_lock (GpmManager *manager)
+{
+	gpm_screensaver_lock ();
+}
+
 /** Callback for the idle function.
  */
 static void
@@ -944,11 +960,12 @@
 	 * http://bugzilla.gnome.org/show_bug.cgi?id=321313
 	 */
 	if (state) {
-		/* we only do a policy event when the lid is CLOSED */
 		manager_policy_do (manager, GPM_PREF_BUTTON_LID);
 		mode = GPM_DPMS_MODE_OFF;
 	} else {
 		mode = GPM_DPMS_MODE_ON;
+		/* When the lid is opened we get this call. */
+		gpm_screensaver_poke ();
 	}
 
 	error = NULL;
diff -u gnome-power-manager-0.3.4/src/gpm-prefs.h gnome-power-manager-0.3.4/src/gpm-prefs.h
--- gnome-power-manager-0.3.4/src/gpm-prefs.h
+++ gnome-power-manager-0.3.4/src/gpm-prefs.h
@@ -51,6 +51,7 @@
 	GPM_ICON_POLICY_NEVER
 } GpmIconPolicy;
 
+#define ACTION_LOCK             "lock"
 #define ACTION_SUSPEND		"suspend"
 #define ACTION_SHUTDOWN		"shutdown"
 #define ACTION_HIBERNATE	"hibernate"
diff -u gnome-power-manager-0.3.4/debian/changelog gnome-power-manager-0.3.4/debian/changelog
--- gnome-power-manager-0.3.4/debian/changelog
+++ gnome-power-manager-0.3.4/debian/changelog
@@ -1,3 +1,12 @@
+gnome-power-manager (0.3.4-0ubuntu7) dapper; urgency=low
+
+  * Add support for a 'lock' action in gnome-power-manager
+  * Added support for such in gnome-power-preferences
+  * When lid is opened, poke the screensaver if we may have locked it before.
+  * closes malone #29881
+
+ -- Daniel Silverstone <daniel.silverstone@ubuntu.com>  Tue, 14 Feb 2006 16:08:58 +0000
+
 gnome-power-manager (0.3.4-0ubuntu6) dapper; urgency=low
 
   * src/gpm-hal.c
only in patch2:
unchanged:
--- gnome-power-manager-0.3.4.orig/help/Makefile.in
+++ gnome-power-manager-0.3.4/help/Makefile.in
@@ -762,7 +762,7 @@
 .PHONY: po
 po: $(_DOC_POFILES)
 
-$(_DOC_POFILES): $(_DOC_C_DOCS)
+$(_DOC_POFILES):
 	@if ! test -d $(dir $@); then \
 	  echo "mkdir $(dir $@)"; \
 	  mkdir "$(dir $@)"; \
only in patch2:
unchanged:
--- gnome-power-manager-0.3.4.orig/src/gpm-manager.h
+++ gnome-power-manager-0.3.4/src/gpm-manager.h
@@ -87,6 +87,7 @@
                                              const char    *mode,
                                              GError       **error);
 
+void           gpm_manager_lock             (GpmManager    *manager);
 void           gpm_manager_suspend          (GpmManager    *manager);
 void           gpm_manager_hibernate        (GpmManager    *manager);
 void           gpm_manager_shutdown         (GpmManager    *manager);
only in patch2:
unchanged:
--- gnome-power-manager-0.3.4.orig/src/gpm-prefs.c
+++ gnome-power-manager-0.3.4/src/gpm-prefs.c
@@ -54,6 +54,7 @@
 };
 
 /* The text that should appear in the action combo boxes */
+#define ACTION_LOCK_TEXT                _("Lock Screen")
 #define ACTION_SUSPEND_TEXT		_("Suspend")
 #define ACTION_SHUTDOWN_TEXT		_("Shutdown")
 #define ACTION_HIBERNATE_TEXT		_("Hibernate")
@@ -336,7 +337,9 @@
 	} else if (strcmp (value, ACTION_HIBERNATE_TEXT) == 0) {
 		action = ACTION_HIBERNATE;	
 	} else if (strcmp (value, ACTION_SHUTDOWN_TEXT) == 0) {
-		action = ACTION_SHUTDOWN;	
+		action = ACTION_SHUTDOWN;
+	} else if (strcmp (value, ACTION_LOCK_TEXT) == 0) {
+		action = ACTION_LOCK;
 	} else if (strcmp (value, ACTION_NOTHING_TEXT) == 0) {
 		action = ACTION_NOTHING;	
 	} else {
@@ -390,6 +393,10 @@
 			gtk_combo_box_append_text (GTK_COMBO_BOX (widget),
 						   ACTION_HIBERNATE_TEXT);
 			n_added++;
+		} else if (strcmp (actions[i], ACTION_LOCK) == 0) {
+			gtk_combo_box_append_text (GTK_COMBO_BOX (widget),
+						   ACTION_LOCK_TEXT);
+			n_added++;
 		} else if (strcmp (actions[i], ACTION_NOTHING) == 0) {
 			gtk_combo_box_append_text (GTK_COMBO_BOX (widget),
 						   ACTION_NOTHING_TEXT);
@@ -526,8 +533,8 @@
 	GConfClient  *client;
 	GtkSizeGroup *size_group;
 	const char   *sleep_type_actions[] = {ACTION_SUSPEND, ACTION_HIBERNATE, NULL};
-	const char   *button_suspend_actions[] = {ACTION_NOTHING, ACTION_SUSPEND, ACTION_HIBERNATE, NULL};
-	const char   *button_lid_actions[] = {ACTION_NOTHING, ACTION_SUSPEND, ACTION_HIBERNATE, NULL};
+	const char   *button_suspend_actions[] = {ACTION_NOTHING, ACTION_LOCK, ACTION_SUSPEND, ACTION_HIBERNATE, NULL};
+	const char   *button_lid_actions[] = {ACTION_NOTHING, ACTION_LOCK, ACTION_SUSPEND, ACTION_HIBERNATE, NULL};
 	const char   *battery_critical_actions[] = {ACTION_NOTHING, ACTION_HIBERNATE, ACTION_SHUTDOWN, NULL};
 	GtkWidget    *label_sleep_type;
 	GtkWidget    *combo_sleep_type;
