FLTK logo

STR #2860

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 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]

STR #2860

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Multi-head full screen support
Version:1.3-feature
Created By:ossman
Assigned To:ossman
Fix Version:1.3-current (SVN: v10189)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 ossman
04:06 Jul 13, 2012
fltk-1.3.x-screen_num.patch
5k
 
 
#2 ossman
04:06 Jul 13, 2012
fltk-1.3.x-multihead.patch
16k
 
 
#3 ossman
07:47 Aug 27, 2012
fltk-1_v2.3.x-multihead.patch
16k
 
 
#4 astrand
06:04 Jan 16, 2013
fltk-1_v3.3.x-multihead.patch
16k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 ossman
04:06 Jul 13, 2012
These patches extend the current full screen support so that an application can become full screen over multiple monitors.

Example application in tests/ is also updated.

Patches are against r9619. Hopefully they still apply to trunk.
 
 
#2 ossman
04:07 Jul 13, 2012
I've tested on Linux and Windows. Unfortunately I have no Mac with multi-head, so the OS X code is untested. Planning to buy one though, so will test in the coming months.  
 
#3 ossman
07:48 Aug 27, 2012
Updated patch. Finally got a OS X test machine, and of course found a bug.  
 
#4 manolo
10:01 Aug 30, 2012
A function
int Fl::screen_num(x,y,w,h)
is missing from the patch.

I have put it in file src/screen_xywh.cxx and reordered things
relatively to function Fl::screen_xywh(X,Y,W,H,mx,my,mw,mh)
as follows

/**
 Gets the screen number for the screen
 which intersects the most with the rectangle
 defined by \p x, \p y, \p w, \p h.
 \return The screen number (between 0 and Fl::screen_count() - 1).
*/
int Fl::screen_num(int x, int y, int w, int h) {
  int best_screen = 0;
  float best_intersection = 0.;
  for(int i = 0; i < Fl::screen_count(); i++) {
    int sx, sy, sw, sh;
    Fl::screen_xywh(sx, sy, sw, sh, i);
    float sintersection = fl_intersection(x, y, w, h, sx, sy, sw, sh);
    if(sintersection > best_intersection) {
      best_screen = i;
      best_intersection = sintersection;
    }
  }
  return best_screen;
}

/**
 Gets the screen bounding rect for the screen
 which intersects the most with the rectangle
 defined by \p mx, \p my, \p mw, \p mh.
 \param[out]  X,Y,W,H the corresponding screen bounding box
 \param[in] mx, my, mw, mh the rectangle to search for intersection with
 \see void screen_xywh(int &X, int &Y, int &W, int &H, int n)
 */
void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh) {
  screen_xywh(X, Y, W, H, Fl::screen_num(mx, my, mw, mh) );
}

With this, the patch seems OK under Mac OS X.
 
 
#5 greg.ercolano
10:27 Aug 30, 2012
@manolo: First patch has the xywh version of screen_num().
So of the three patches he posted here, I think he wants you to apply them this way:

    1) fltk-1.3.x-screen_num.patch   <-- apply
    2) fltk-1.3.x-multihead.patch    <-- ignore (use #3 instead)
    3) fltk-1_v2.3.x-multihead.patch <-- apply

I haven't tried the patches, but I looked them over a few days ago
just to see how the API was being changed.
 
 
#6 ianmacarthur
06:24 Jan 16, 2013
I quite like the idea of this patch, but do we need ABI guards around the new bits to prevent it breaking builds for folk using dynamic linking?  
 
#7 astrand
06:37 Jan 16, 2013
fltk-1_v3.3.x-multihead.patch has been adapted for FLTK 1.3.2. Thus, you should apply:

1) fltk-1.3.x-screen_num.patch

2) fltk-1_v3.3.x-multihead.patch

The first patch is smaller, perhaps we can start with applying this?
 
 
#8 manolo
07:51 Sep 16, 2013
I believe these lines
#if FLTK_ABI_VERSION < 10302
should become
#if FLTK_ABI_VERSION < 10303
in the patch
 
 
#9 greg.ercolano
15:02 Sep 16, 2013
Yes, I think Manolo is correct; you want 'static' built into the code
if the current ABI version is 1.3.2 or less, so that would be:

#if FLTK_ABI_VERSION < 10303

This is because 1.3.2 already has been released, and has a
stable API.

And with the above change, the comments should likewise be modified
as follows:

+  static // when these members are static, ABI compatibility with 1.3.2 (and older) is respected

I believe this goes for all the FLTK_ABI_VERSION additions.
For more info, see:
http://www.fltk.org/cmp.php#FLTK_ABI_VERSION
 
 
#10 ossman
23:01 Sep 16, 2013
Good point. The patch was older than 1.3.2, hence the version numbers.  
 
#11 greg.ercolano
11:31 Sep 21, 2013
Assigning to me.. in a mood to move STRs forward.  
 
#12 greg.ercolano
19:35 Sep 21, 2013
Applied fltk-1.3.x-screen_num.patch as r9982.

Caveats: small mods for CMP compliance, documented fl_intersection().

Investigating other patch next.
 
 
#13 ossman
02:12 Jun 11, 2014
Fixed in Subversion repository.  
     

Return to Bugs & Features ]

 
 

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'.