summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-07-26 14:06:18 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-07-26 18:58:44 +0200
commit2241bab478aa0ee632de99598be50a53c78f56b3 (patch)
treea0d7706525e90506d8f9f6f9f60b7ee2551bb2f5 /src
parentf61dfc3c05000be44e873b3f36b6979785ad4488 (diff)
Remove useless variables and preprocessor directives.
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx1
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx9
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx3
3 files changed, 3 insertions, 10 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
index 686d0c1db..10b6d61fb 100644
--- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
@@ -397,7 +397,6 @@ static void delayed_redraw(Fl_Window *win) {
}
void Fl_Wayland_Gl_Window_Driver::gl_start() {
- struct wld_window *win = fl_xid(Fl_Window::current());
float f = Fl::screen_scale(Fl_Window::current()->screen_num());
int W = Fl_Window::current()->w() * f;
int H = Fl_Window::current()->h() * f;
diff --git a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
index 9cea1cd86..34a9e30db 100644
--- a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
@@ -19,21 +19,18 @@
#include "Fl_Wayland_Graphics_Driver.H"
#include "Fl_Wayland_Screen_Driver.H"
#include "Fl_Wayland_Window_Driver.H"
-#include "text-input-client-protocol.h"
#include <pango/pangocairo.h>
#if ! PANGO_VERSION_CHECK(1,22,0)
# error "Requires Pango 1.22 or higher"
#endif
-#define _GNU_SOURCE 1
#include <sys/mman.h>
-#include <unistd.h>
-#include <fcntl.h>
+#include <unistd.h> // for close()
#include <errno.h>
extern unsigned fl_cmap[256]; // defined in fl_color.cxx
extern "C" {
- int os_create_anonymous_file(off_t);
+ int os_create_anonymous_file(off_t); // in libdecor
}
@@ -167,7 +164,7 @@ void Fl_Wayland_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_O
}
-void Fl_Wayland_Graphics_Driver::gc(void *off) {} // equivalent is done by activate()
+void Fl_Wayland_Graphics_Driver::gc(void *off) {} // equivalent is done by set_buffer()
void *Fl_Wayland_Graphics_Driver::gc() {
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 2c9402061..2da3b9844 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -25,14 +25,12 @@
#include "xdg-shell-client-protocol.h"
#include <pango/pangocairo.h>
#include <FL/Fl_Overlay_Window.H>
-#include <FL/Fl_Menu_Window.H>
#include <FL/Fl_Tooltip.H>
#include <FL/fl_draw.H>
#include <FL/fl_ask.H>
#include <FL/Fl.H>
#include <FL/Fl_Image_Surface.H>
#include <string.h>
-#include <sys/mman.h>
#include <math.h> // for ceil()
#include <sys/types.h> // for pid_t
#include <unistd.h> // for getpid()
@@ -155,7 +153,6 @@ void Fl_Wayland_Window_Driver::take_focus()
{
Window w = fl_xid(pWindow);
if (w) {
- Fl_Widget *old_focus = Fl::focus();
Fl_Window *old_first = Fl::first_window();
Window first_xid = (old_first ? fl_xid(old_first->top_window()) : NULL);
if (first_xid && first_xid != w && xdg_toplevel()) {