FLTK logo

[master] 17467b4 - Wayland: remove useless member variables of struct output

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 17467b4 - Wayland: remove useless member variables of struct output "ManoloFLTK" Jan 22, 2023  
 
commit 17467b48bdf540cc7fc8d7cbc814a788210f8693
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon Jan 23 08:11:10 2023 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon Jan 23 08:11:10 2023 +0100

    Wayland: remove useless member variables of struct output

 src/drivers/Wayland/Fl_Wayland_Screen_Driver.H   | 2 --
 src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 9 ++-------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git src/drivers/Wayland/Fl_Wayland_Screen_Driver.H src/drivers/Wayland/Fl_Wayland_Screen_Driver.H
index afc895e..bd3edd9 100644
--- src/drivers/Wayland/Fl_Wayland_Screen_Driver.H
+++ src/drivers/Wayland/Fl_Wayland_Screen_Driver.H
@@ -102,8 +102,6 @@ public:
   struct wl_list outputs; // linked list of all screens in system
   struct output { // one record for each screen
     uint32_t id;
-    short x_org;
-    short y_org;
     short width; // in pixels
     short height; // in pixels
     float dpi;
diff --git src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 638ea48..6503f76 100644
--- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -96,8 +96,6 @@ struct pointer_output {
 
  struct Fl_Wayland_Screen_Driver::output { // FLTK defined
     uint32_t id; // screen identification
-    short x_org;
-    short y_org;
     short width; // screen width in pixels
     short height; // screen height in pixels
     float dpi;
@@ -929,8 +927,6 @@ static void output_mode(void *data, struct wl_output *wl_output, uint32_t flags,
       int32_t width, int32_t height, int32_t refresh)
 {
   Fl_Wayland_Screen_Driver::output *output = (Fl_Wayland_Screen_Driver::output*)data;
-  output->x_org = 0;
-  output->y_org = 0;
   output->width = width;
   output->height = height;
 //fprintf(stderr, "output_mode: [%p]=%dx%d\n",output->wl_output,width,height);
@@ -1251,8 +1247,7 @@ void Fl_Wayland_Screen_Driver::screen_xywh(int &X, int &Y, int &W, int &H, int n
     wl_list_for_each(output, &outputs, link) {
       if (i++ == n) { // n'th screen of the system
         float s = output->gui_scale * output->wld_scale;
-        X = output->x_org / s;
-        Y = output->y_org / s;
+        X = Y = 0;
         W = output->width / s;
         H = output->height / s;
         break;
@@ -1404,7 +1399,7 @@ int Fl_Wayland_Screen_Driver::screen_num_unscaled(int x, int y)
   int screen = 0;
   wl_list_for_each(output, &outputs, link) {
     int s = output->wld_scale;
-    int sx = output->x_org/s, sy = output->y_org/s, sw = output->width/s, sh = output->height/s;
+    int sx = 0, sy = 0, sw = output->width/s, sh = output->height/s;
     if ((x >= sx) && (x < (sx+sw)) && (y >= sy) && (y < (sy+sh))) {
       return screen;
     }
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.