bugGNU Octave - Bugs: bug #35199, figure windows should set a...

 
 

bug #35199: figure windows should set a WM_CLASS property

Submitted by:  None
Submitted on:  Fri 30 Dec 2011 02:02:08 PM UTC  
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Colin Macdonald Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  3.4.3
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Sat 10 Mar 2012 10:19:08 PM UTC, comment #7: 

I committed the patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/c97416a0f657).  Closing this report.

Rik <rik5>
Project Administrator
Sat 10 Mar 2012 08:36:14 PM UTC, comment #6: 

Ok, posted a new version which calls xclass() right before show().  Hope this works on FLTK 1.1.

The #ifdef idea would be fine too (probably no one is using gnome-shell with older FLTK), but I don't know enough about autotools to know how to do this.

Colin Macdonald <cbm>
Thu 23 Feb 2012 06:49:21 AM UTC, comment #5: 

I tried the patch but the function you used, default_xclass(), is not available in older versions of FLTK such as 1.10.  Is there a way to code the same functionality that would work for both 1.10 and 1.3?

If not, the patch would need to be modified with an #ifdef that only compiled the default_xclass() function call if configure.ac had detected that it was available.

Rik <rik5>
Project Administrator
Sat 31 Dec 2011 03:10:17 PM UTC, comment #4: 

I made a patch for gnuplot for X11 terminal and submitted it as tracker 3467910 on sourceforge:

http://sourceforge.net/tracker/?func=detail&aid=3467910&group_id=2055&atid=302055

This will at least match the behavior of wxt terminal ("Gnuplot").

(That still doesn't make them grouped in the dash (at least with my gnome-shell 3.2.1).  But that can be worked around by creating a gnuplot.desktop file in ~/.local/share/applications or /usr/local/share/applications)

Colin Macdonald <cbm>
Sat 31 Dec 2011 08:38:31 AM UTC, comment #3: 

For gnuplot, setenv ("GNUTERM", "wxt") is a workaround (all figures get grouped under an item called "Gnuplot" rather than "Octave")

I'll attach a patch for FLTK.

As per the webpage, here is a possible Changelog header:

2011-12-30  Colin Macdonald  <macdonald@maths.ox.ac.uk>

        Improve figure interaction with gnome-shell and FLTK backend (Bug #35199)

(file #24714)

Colin Macdonald <cbm>
Fri 30 Dec 2011 02:57:56 PM UTC, comment #2: 

Its definitly possible with FLTK (e.g., http://progressive-comp.com/?l=tigervnc-commits&m=131644002411494&w=2).  I'm recompiling Octave to see if that works.

Not sure re: gnuplot...

Colin Macdonald <cbm>
Fri 30 Dec 2011 02:44:25 PM UTC, comment #1: 

Do you know if it's possible to do this for gnuplot? Communication with gnuplot is via pipes and forking a new process, and I don't think we can do better than that.

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Fri 30 Dec 2011 02:02:08 PM UTC, original submission:  

For interacting with gnome-shell in Gnome 3, it would be helpful if each figure window had a WM_CLASS of "Octave".  That way gnome-shell could group them all under a "Octave" item on the dash (https://live.gnome.org/GnomeShell/ApplicationBased).  Currently each figure generates a new icon.

If I get around to it, I might try to patch this, but I'll open in bug in case I don't.


More info:

Here is what xprop says for the various backends:

gnuplot:
  currently no wm_class property at all.

FLTK:
  WM_CLASS(STRING) = "FLTK", "FLTK"

GL:
  untested, I've never learned how to use this backend.

(FWIW, Matlab also has this problem, e.g., https://bugzilla.gnome.org/show_bug.cgi?id=651510)

Ipython and matplotlib do not: there the WM_CLASS is set to "ipython", "IPython" (which is why I propose Octave use "Octave").

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #25315:  octave-gnome-shell2.patch added by cbm (1KiB - text/x-patch - octave-gnome-shell2.patch, without using default_xclass())
file #24714:  octave-gnome-shell.patch added by cbm (991B - text/x-patch - octave-gnome-shell.patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by cbm (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-03-10 rik5 StatusNeed Info => Fixed
        Open/ClosedOpen => Closed
    2012-03-10 cbm Attached File- => Added octave-gnome-shell2.patch, #25315
    2012-02-23 rik5 StatusNone => Need Info
    2011-12-31 cbm Attached File- => Added octave-gnome-shell.patch, #24714

    Back to the top


    Powered by Savane 3.5