Remove useless variables and preprocessor directives.

This commit is contained in:
ManoloFLTK 2022-07-26 14:06:18 +02:00
parent f61dfc3c05
commit 2241bab478
3 changed files with 3 additions and 10 deletions

View File

@ -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;

View File

@ -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() {

View File

@ -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()) {