# HG changeset patch # User Colin Macdonald # Date 1331417674 28800 # Node ID c97416a0f657f56a3234ec993e34258463f0da6b # Parent 12ccdce2c2166170195b7f9739be4828cd4371db Allow window managers to group FLTK plot windows (bug #35199) * __init_fltk__.cc: Set WM_CLASS on plot windows to "Octave". diff --git a/src/DLD-FUNCTIONS/__init_fltk__.cc b/src/DLD-FUNCTIONS/__init_fltk__.cc --- a/src/DLD-FUNCTIONS/__init_fltk__.cc +++ b/src/DLD-FUNCTIONS/__init_fltk__.cc @@ -668,6 +668,14 @@ callback (window_close, static_cast (this)); size_range (4*status_h, 2*status_h); + // FIXME: The function below is only available in FLTK >= 1.3 + // At some point support for FLTK 1.1 will be dropped in Octave. + // At that point this function should be uncommented. + // The current solution is to call xclass() before show() for each window. + // Set WM_CLASS which allows window managers to properly group related + // windows. Otherwise, the class is just "FLTK" + //default_xclass ("Octave"); + begin (); { @@ -722,6 +730,13 @@ canvas->mode (FL_DEPTH | FL_DOUBLE ); if (fp.is_visible ()) { + // FIXME: This code should be removed when Octave drops support + // for FLTK 1.1. Search for default_xclass in this file to find + // code that should be uncommented to take its place. + // + // Set WM_CLASS which allows window managers to properly group + // related windows. Otherwise, the class is just "FLTK" + xclass ("Octave"); show (); if (fp.get_currentaxes ().ok()) show_canvas ();