Browse Source

Fix screen blanking for lockscreen. Allow right-click access when debug_mode is enabled. Add additional debug messages.

sisyphus
Dustin Falgout 9 years ago
parent
commit
aee47f1f02
  1. 6
      NEWS
  2. 2
      configure.ac
  3. 1
      data/lightdm-webkit2-greeter.conf
  4. 19
      src/lightdm-webkit2-greeter.c
  5. 10
      themes/antergos/js/greeter.js

6
NEWS

@ -1,3 +1,9 @@
Overview of changes in lightdm-webkit2-greeter 2.1.2
* Allow access to right-click context menu when debug mode is enabled in lightdm-webkit2-greeter.conf.
* Add additional debug messages to the default theme to help identify points of failure.
* Fix issue with screen blanking functionality when greeter is used as a lockscreen.
Overview of changes in lightdm-webkit2-greeter 2.1.1
* Fix default theme initialization failure if config file values are missing.

2
configure.ac

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(lightdm-webkit2-greeter, 2.1.1)
AC_INIT(lightdm-webkit2-greeter, 2.1.2)
AC_SUBST(THEME_DIR)
AC_CONFIG_HEADER(config.h)
AC_PREREQ([2.59])

1
data/lightdm-webkit2-greeter.conf

@ -7,6 +7,7 @@
[greeter]
webkit-theme = antergos
debug_mode = false
screensaver-timeout = 300
#
# [branding]

19
src/lightdm-webkit2-greeter.c

@ -58,6 +58,7 @@ static GdkDisplay *default_display;
static int timeout, interval, prefer_blanking, allow_exposures;
static gint config_timeout;
static gboolean debug_mode;
static GdkFilterReturn
wm_window_filter(GdkXEvent *gxevent, GdkEvent *event, gpointer data) {
@ -100,15 +101,9 @@ initialize_web_extensions_cb(WebKitWebContext *context, gpointer user_data) {
static void
create_new_webkit_settings_object(void) {
webkit_settings = webkit_settings_new_with_settings(
"enable-developer-extras", FALSE,
"enable-fullscreen", TRUE,
"enable-site-specific-quirks", TRUE,
"enable-dns-prefetching", TRUE,
"enable-developer-extras", TRUE,
"javascript-can-open-windows-automatically", TRUE,
"allow-file-access-from-file-urls", TRUE,
"enable-accelerated-2d-canvas", TRUE,
"enable-smooth-scrolling", FALSE,
"enable-webgl", TRUE,
"enable-write-console-messages-to-stdout", TRUE,
NULL
);
@ -122,7 +117,11 @@ context_menu_cb(WebKitWebView *view,
WebKitHitTestResult *hit_test_result,
gpointer user_data) {
return TRUE;
/* Returning true without creating a custom context menu results in no context
* menu being shown. Thus, we are returning the opposite of debug_mode to get
* desired result (which is only show menu when debug_mode is enabled.
*/
return (! debug_mode);
}
@ -135,10 +134,11 @@ context_menu_cb(WebKitWebView *view,
static void
lock_hint_enabled_handler(void) {
Display *display = gdk_x11_display_get_xdisplay(default_display);
config_timeout = (0 != config_timeout) ? config_timeout : 300;
XGetScreenSaver(display, &timeout, &interval, &prefer_blanking, &allow_exposures);
XForceScreenSaver(display, ScreenSaverActive);
XSetScreenSaver(display, config_timeout, 0, ScreenSaverActive, DefaultExposures);
XSetScreenSaver(display, config_timeout, 0, PreferBlanking, DefaultExposures);
}
@ -201,6 +201,7 @@ main(int argc, char **argv) {
theme = g_key_file_get_string(keyfile, "greeter", "webkit-theme", NULL);
config_timeout = g_key_file_get_integer(keyfile, "greeter", "screensaver-timeout", NULL);
debug_mode = g_key_file_get_boolean(keyfile, "greeter", "debug_mode", NULL);
/* Setup the main window */
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

10
themes/antergos/js/greeter.js

@ -393,15 +393,25 @@ class AntergosTheme {
* Initialize the theme.
*/
initialize() {
_util.log('initialize() starting.');
this.prepare_translations();
_util.log('initialize() 1.');
this.do_static_translations();
_util.log('initialize() 2.');
this.initialize_clock();
_util.log('initialize() 3.');
this.prepare_login_panel_header();
_util.log('initialize() 4.');
this.prepare_user_list();
_util.log('initialize() 5.');
this.prepare_session_list();
_util.log('initialize() 6.');
this.prepare_system_action_buttons();
_util.log('initialize() 7.');
this.register_callbacks();
_util.log('initialize() 8.');
this.background_manager.setup_background_thumbnails();
_util.log('initialize() finished.');
}

Loading…
Cancel
Save