mid-kid
7 years ago
39 changed files with 99 additions and 198 deletions
@ -1,98 +0,0 @@ |
|||||
# Adapted from: https://github.com/chrjguill/i3lock-color/commit/d9f2e04bab3c5f2bed674edd085355da255f892b |
|
||||
|
|
||||
+++ i3lock.1
|
|
||||
@@ -110,6 +110,10 @@
|
|
||||
Enables debug logging. |
|
||||
Note, that this will log the password used for authentication to stdout. |
|
||||
|
|
||||
+.TP
|
|
||||
+.B \-\-no-composite
|
|
||||
+Some compositors have problems with i3lock trying to render over them. If you're having graphical problems, try this arg.
|
|
||||
+
|
|
||||
.SH DPMS |
|
||||
|
|
||||
The \-d (\-\-dpms) option was removed from i3lock in version 2.8. There were |
|
||||
+++ i3lock.c
|
|
||||
@@ -90,6 +90,9 @@
|
|
||||
bool ignore_empty_password = false; |
|
||||
bool skip_repeated_empty_password = false; |
|
||||
|
|
||||
+/* there's some issues with compositing currently. Let's supply an arg to disable it. */
|
|
||||
+bool composite = true;
|
|
||||
+
|
|
||||
/* isutf, u8_dec © 2005 Jeff Bezanson, public domain */ |
|
||||
#define isutf(c) (((c)&0xC0) != 0x80) |
|
||||
|
|
||||
@@ -835,6 +838,7 @@
|
|
||||
{"ignore-empty-password", no_argument, NULL, 'e'}, |
|
||||
{"inactivity-timeout", required_argument, NULL, 'I'}, |
|
||||
{"show-failed-attempts", no_argument, NULL, 'f'}, |
|
||||
+ {"no-composite", no_argument, NULL, 0},
|
|
||||
{NULL, no_argument, NULL, 0}}; |
|
||||
|
|
||||
if ((pw = getpwuid(getuid())) == NULL) |
|
||||
@@ -896,6 +900,8 @@
|
|
||||
case 0: |
|
||||
if (strcmp(longopts[optind].name, "debug") == 0) |
|
||||
debug_mode = true; |
|
||||
+ else if (strcmp(longopts[optind].name, "no-composite") == 0)
|
|
||||
+ composite = false;
|
|
||||
break; |
|
||||
case 'f': |
|
||||
show_failed_attempts = true; |
|
||||
+++ xcb.c
|
|
||||
@@ -25,6 +25,7 @@
|
|
||||
#include "unlock_indicator.h" |
|
||||
|
|
||||
extern auth_state_t auth_state; |
|
||||
+extern bool composite;
|
|
||||
|
|
||||
xcb_connection_t *conn; |
|
||||
xcb_screen_t *screen; |
|
||||
@@ -109,26 +110,28 @@
|
|
||||
xcb_window_t win = xcb_generate_id(conn); |
|
||||
xcb_window_t parent_win = scr->root; |
|
||||
|
|
||||
- /* Check whether the composite extension is available */
|
|
||||
- const xcb_query_extension_reply_t *extension_query = NULL;
|
|
||||
- xcb_generic_error_t *error = NULL;
|
|
||||
- xcb_composite_get_overlay_window_cookie_t cookie;
|
|
||||
- xcb_composite_get_overlay_window_reply_t *composite_reply = NULL;
|
|
||||
-
|
|
||||
- extension_query = xcb_get_extension_data(conn, &xcb_composite_id);
|
|
||||
- if (extension_query && extension_query->present) {
|
|
||||
- /* When composition is used, we need to use the composite overlay
|
|
||||
- * window instead of the normal root window to be able to cover
|
|
||||
- * composited windows */
|
|
||||
- cookie = xcb_composite_get_overlay_window(conn, scr->root);
|
|
||||
- composite_reply = xcb_composite_get_overlay_window_reply(conn, cookie, &error);
|
|
||||
+ if (composite) {
|
|
||||
+ /* Check whether the composite extension is available */
|
|
||||
+ const xcb_query_extension_reply_t *extension_query = NULL;
|
|
||||
+ xcb_generic_error_t *error = NULL;
|
|
||||
+ xcb_composite_get_overlay_window_cookie_t cookie;
|
|
||||
+ xcb_composite_get_overlay_window_reply_t *composite_reply = NULL;
|
|
||||
+
|
|
||||
+ extension_query = xcb_get_extension_data(conn, &xcb_composite_id);
|
|
||||
+ if (extension_query && extension_query->present) {
|
|
||||
+ /* When composition is used, we need to use the composite overlay
|
|
||||
+ * window instead of the normal root window to be able to cover
|
|
||||
+ * composited windows */
|
|
||||
+ cookie = xcb_composite_get_overlay_window(conn, scr->root);
|
|
||||
+ composite_reply = xcb_composite_get_overlay_window_reply(conn, cookie, &error);
|
|
||||
+
|
|
||||
+ if (!error && composite_reply) {
|
|
||||
+ parent_win = composite_reply->overlay_win;
|
|
||||
+ }
|
|
||||
|
|
||||
- if (!error && composite_reply) {
|
|
||||
- parent_win = composite_reply->overlay_win;
|
|
||||
+ free(composite_reply);
|
|
||||
+ free(error);
|
|
||||
} |
|
||||
-
|
|
||||
- free(composite_reply);
|
|
||||
- free(error);
|
|
||||
} |
|
||||
|
|
||||
if (pixmap == XCB_NONE) { |
|
Loading…
Reference in new issue