Skip to content

Commit

Permalink
Fix build with specific option combination (#1918)
Browse files Browse the repository at this point in the history
Fixes incorrect member accessing left behind after #1910.
  • Loading branch information
fernape authored May 15, 2024
1 parent 2d50767 commit c635df8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/llua.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ extern "C" {
}

#include <config.h>
#include "geometry.h"

#ifdef BUILD_MOUSE_EVENTS
#include "mouse-events.h"
Expand Down
2 changes: 1 addition & 1 deletion src/x11-settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ bool use_xpmdb_setting::set_up(lua::state &l) {
if (!out_to_x.get(l)) return false;

window.back_buffer =
XCreatePixmap(display, window.window, window.width + 1, window.height + 1,
XCreatePixmap(display, window.window, window.geometry.get_width() + 1, window.geometry.get_height() + 1,
DefaultDepth(display, screen));
if (window.back_buffer != None) {
window.drawable = window.back_buffer;
Expand Down
6 changes: 3 additions & 3 deletions src/x11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1219,10 +1219,10 @@ void xdbe_swap_buffers() {
void xpmdb_swap_buffers(void) {
if (use_xpmdb.get(*state)) {
XCopyArea(display, window.back_buffer, window.window, window.gc, 0, 0,
window.width, window.height, 0, 0);
window.geometry.get_width(), window.geometry.get_height(), 0, 0);
XSetForeground(display, window.gc, 0);
XFillRectangle(display, window.drawable, window.gc, 0, 0, window.width,
window.height);
XFillRectangle(display, window.drawable, window.gc, 0, 0, window.geometry.get_width(),
window.geometry.get_height());
XFlush(display);
}
}
Expand Down

0 comments on commit c635df8

Please sign in to comment.