Skip to content
Snippets Groups Projects
Commit 2ea1515f authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Undo part of the previous commit.

All of this code runs in the same thread, races aren't possible.
parent e34bd553
No related branches found
No related tags found
No related merge requests found
Pipeline #6751 passed
...@@ -165,7 +165,6 @@ static int r_shift; ...@@ -165,7 +165,6 @@ static int r_shift;
static int g_shift; static int g_shift;
static int b_shift; static int b_shift;
static struct graphics_buffer *last = NULL; static struct graphics_buffer *last = NULL;
pthread_mutex_t last_mutex;
#ifdef WITH_XRENDER #ifdef WITH_XRENDER
static XRenderPictFormat *xrender_pf = NULL; static XRenderPictFormat *xrender_pf = NULL;
static Pixmap xrender_pm = None; static Pixmap xrender_pm = None;
...@@ -728,12 +727,10 @@ resize_pictures(void) ...@@ -728,12 +727,10 @@ resize_pictures(void)
static void static void
free_last(void) free_last(void)
{ {
pthread_mutex_lock(&last_mutex);
if (last) { if (last) {
release_buffer(last); release_buffer(last);
last = NULL; last = NULL;
} }
pthread_mutex_unlock(&last_mutex);
} }
static void resize_xim(void) static void resize_xim(void)
...@@ -1383,7 +1380,6 @@ local_draw_rect(struct rectlist *rect) ...@@ -1383,7 +1380,6 @@ local_draw_rect(struct rectlist *rect)
/* TODO: Translate into local colour depth */ /* TODO: Translate into local colour depth */
idx = 0; idx = 0;
pthread_mutex_lock(&last_mutex);
for (y = 0; y < dh; y++) { for (y = 0; y < dh; y++) {
for (x = 0; x < dw; x++) { for (x = 0; x < dw; x++) {
if (last) { if (last) {
...@@ -1488,7 +1484,6 @@ local_draw_rect(struct rectlist *rect) ...@@ -1488,7 +1484,6 @@ local_draw_rect(struct rectlist *rect)
#endif #endif
} }
last = source; last = source;
pthread_mutex_lock(&last_mutex);
} }
static void handle_resize_event(int width, int height, bool map) static void handle_resize_event(int width, int height, bool map)
...@@ -2272,7 +2267,6 @@ void x11_event_thread(void *args) ...@@ -2272,7 +2267,6 @@ void x11_event_thread(void *args)
return; return;
} }
sem_init(&event_thread_complete, 0, 0); sem_init(&event_thread_complete, 0, 0);
pthread_mutex_init(&last_mutex, NULL);
atexit(x11_terminate_event_thread); atexit(x11_terminate_event_thread);
......
...@@ -12,7 +12,6 @@ Fix focus-follows-mouse behaviour in herbstluftwm ...@@ -12,7 +12,6 @@ Fix focus-follows-mouse behaviour in herbstluftwm
Fix SAUCE binary capture date Fix SAUCE binary capture date
Add Build Options menu item Add Build Options menu item
Fix saving non-integer scaling in GDI mode Fix saving non-integer scaling in GDI mode
Fix X11 race between Expose event and redraw
Version 1.2rc1 Version 1.2rc1
-------------- --------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment