Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 215154 Details for
Bug 288706
>=gnome-extra/gnome-screensaver-2.26.1 ignores "gnome-screensaver-command -p"
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
10_legacy_scrsvr_inhibit.patch
10_legacy_scrsvr_inhibit.patch (text/plain), 3.96 KB, created by
Pacho Ramos
on 2010-01-04 11:31:18 UTC
(
hide
)
Description:
10_legacy_scrsvr_inhibit.patch
Filename:
MIME Type:
Creator:
Pacho Ramos
Created:
2010-01-04 11:31:18 UTC
Size:
3.96 KB
patch
obsolete
> >++ gnome-screensaver-2.28.0/debian/patches/10_legacy_scrsvr_inhibit.patch > >Description: Reintroduce legacy API for inhibiting the screensaver >. >This patch is backported from Lucid and adapted to minimize the autotools >changes required, to make it easier to review - for example, the configure >check for xtst has been removed. >Author: Chris Coulson <chrisccoulson@ubuntu.com> >Bug-Ubuntu: https://bugs.launchpad.net/bugs/428884 >Bug: https://bugzilla.gnome.org/show_bug.cgi?id=579430 >Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=579430 > >diff -Nur -x '*.orig' -x '*~' gnome-screensaver-2.28.0/src/gs-monitor.c gnome-screensaver-2.28.0.new/src/gs-monitor.c >--- gnome-screensaver-2.28.0/src/gs-monitor.c 2009-08-20 00:19:14.000000000 +0100 >+++ gnome-screensaver-2.28.0.new/src/gs-monitor.c 2009-12-22 21:33:28.929850158 +0000 >@@ -29,6 +29,10 @@ > #include <glib.h> > #include <glib-object.h> > >+#include <gdk/gdkx.h> >+#include <X11/keysym.h> >+#include <X11/extensions/XTest.h> >+ > #include "gnome-screensaver.h" > > #include "gs-manager.h" >@@ -56,6 +60,10 @@ > GSFade *fade; > GSGrab *grab; > guint release_grab_id; >+ gboolean have_xtest; >+ int keycode1; >+ int keycode2; >+ int *keycode; > }; > > #define FADE_TIMEOUT 10000 >@@ -186,7 +194,19 @@ > static void > gs_monitor_simulate_user_activity (GSMonitor *monitor) > { >- /* FIXME: reset the xsync timer? */ >+ if (monitor->priv->have_xtest) { >+ XLockDisplay (GDK_DISPLAY ()); >+ XTestFakeKeyEvent (GDK_DISPLAY(), *monitor->priv->keycode, >+ True, CurrentTime); >+ XTestFakeKeyEvent (GDK_DISPLAY(), *monitor->priv->keycode, >+ False, CurrentTime); >+ XUnlockDisplay (GDK_DISPLAY()); >+ /* Swap the keycode */ >+ if (monitor->priv->keycode == &monitor->priv->keycode1) >+ monitor->priv->keycode = &monitor->priv->keycode2; >+ else >+ monitor->priv->keycode = &monitor->priv->keycode1; >+ } > > /* request that the manager unlock - > will pop up a dialog if necessary */ >@@ -416,6 +436,7 @@ > static void > gs_monitor_init (GSMonitor *monitor) > { >+ int a, b, c, d; > > monitor->priv = GS_MONITOR_GET_PRIVATE (monitor); > >@@ -435,6 +456,25 @@ > connect_manager_signals (monitor); > > _gs_monitor_update_from_prefs (monitor, monitor->priv->prefs); >+ >+ XLockDisplay (GDK_DISPLAY()); >+ monitor->priv->have_xtest = (XTestQueryExtension (GDK_DISPLAY(), &a, &b, &c, &d) == True); >+ if (monitor->priv->have_xtest != FALSE) >+ { >+ monitor->priv->keycode1 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_L); >+ if (monitor->priv->keycode1 == 0) { >+ g_warning ("monitor->priv->keycode1 not existant"); >+ } >+ monitor->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_R); >+ if (monitor->priv->keycode2 == 0) { >+ monitor->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_L); >+ if (monitor->priv->keycode2 == 0) { >+ g_warning ("monitor->priv->keycode2 not existant"); >+ } >+ } >+ monitor->priv->keycode = &monitor->priv->keycode1; >+ } >+ XUnlockDisplay (GDK_DISPLAY()); > } > > static void >diff -Nur -x '*.orig' -x '*~' gnome-screensaver-2.28.0/src/Makefile.am gnome-screensaver-2.28.0.new/src/Makefile.am >--- gnome-screensaver-2.28.0/src/Makefile.am 2009-08-20 00:19:14.000000000 +0100 >+++ gnome-screensaver-2.28.0.new/src/Makefile.am 2009-12-22 21:32:22.769843081 +0000 >@@ -213,6 +213,7 @@ > gnome_screensaver_LDADD = \ > $(GNOME_SCREENSAVER_LIBS) \ > $(SAVER_LIBS) \ >+ -lXtst \ > $(NULL) > > gnome_screensaver_LDFLAGS = -export-dynamic >diff -Nur -x '*.orig' -x '*~' gnome-screensaver-2.28.0/src/Makefile.in gnome-screensaver-2.28.0.new/src/Makefile.in >--- gnome-screensaver-2.28.0/src/Makefile.in 2009-08-26 17:06:16.000000000 +0100 >+++ gnome-screensaver-2.28.0.new/src/Makefile.in 2009-12-22 21:32:22.769843081 +0000 >@@ -550,6 +550,7 @@ > gnome_screensaver_LDADD = \ > $(GNOME_SCREENSAVER_LIBS) \ > $(SAVER_LIBS) \ >+ -lXtst \ > $(NULL) > > gnome_screensaver_LDFLAGS = -export-dynamic
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 288706
:
206847
| 215154 |
261709