summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-06-09 20:04:23 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-06-09 20:04:23 +0200
commitb17357339f66949de7787e83aa9d21d613439170 (patch)
tree7b1cc77335d5f5f970d13dd535cf8d16f881181f /src
parente5693efb75f8ab50362256c630421e71291cfb46 (diff)
Fix: Changing default color palette affects opengl child drawing on Wayland (#989)
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H2
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx29
2 files changed, 0 insertions, 31 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H
index df321fc10..206efeb80 100644
--- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H
+++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H
@@ -56,8 +56,6 @@ private:
void redraw_overlay() FL_OVERRIDE;
void gl_start() FL_OVERRIDE;
void gl_visual(Fl_Gl_Choice *c) FL_OVERRIDE;
- char *alpha_mask_for_string(
- const char *str, int n, int w, int h, Fl_Fontsize fs) FL_OVERRIDE;
void init();
public:
//virtual bool need_scissor() { return true; } // CONTROL_LEAKING_SUB_GL_WINDOWS
diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
index 5f96480ab..d25738ab3 100644
--- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
@@ -107,35 +107,6 @@ void Fl_Wayland_Gl_Window_Driver::init() {
}
-char *Fl_Wayland_Gl_Window_Driver::alpha_mask_for_string(const char *str, int n,
- int w, int h, Fl_Fontsize fs)
-{
- // write str to a bitmap just big enough
- Fl_Image_Surface *surf = new Fl_Image_Surface(w, h);
- Fl_Font f = fl_font();
- Fl_Surface_Device::push_current(surf);
- fl_color(FL_BLACK);
- fl_rectf(0, 0, w, h);
- fl_color(FL_WHITE);
- fl_font(f, fs);
- fl_draw(str, n, 0, fl_height() - fl_descent());
- // get the R channel only of the bitmap
- char *alpha_buf = new char[w*h], *r = alpha_buf;
- struct Fl_Wayland_Graphics_Driver::draw_buffer *off =
- Fl_Wayland_Graphics_Driver::offscreen_buffer(surf->offscreen());
- for (int i = 0; i < h; i++) {
- uchar *q = off->buffer + i * off->stride;
- for (int j = 0; j < w; j++) {
- *r++ = *q;
- q += 4;
- }
- }
- Fl_Surface_Device::pop_current();
- delete surf;
- return alpha_buf;
-}
-
-
Fl_Gl_Choice *Fl_Wayland_Gl_Window_Driver::find(int m, const int *alistp)
{
m |= FL_DOUBLE;