Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#447 Patch to add "x11.windowid" property

Feature_Request
closed-rejected
Neil Hodgson
SciTE (619)
2
2007-03-06
2006-05-28
Roy Wood
No

Neil, I'm the guy who's working on ScitePM, the
"project manager" for the Linux/Gtk version of SciTE.
One of the things I'd like to be able to do is bring
SciTE to the front ("activate" it in X11 parlance), but
to do that, I need to know the X11 window ID of SciTE.
As a result, I have a small patch to SciTEGTK.cxx that
adds a property called "x11.windowid" to the runtime
property list. Hope the name meets with your approval.

With this property registered, I can then query SciTE
via the Director interface to get the property value,
and things are good....

The changes are at lines 19-21 and 3222-3226 (in case
it gets lost in a sea of diffs....)

Discussion

  • Roy Wood
    Roy Wood
    2006-05-28

    Logged In: YES
    user_id=24927

    Small tweak: might as well be a somewhat typesafe with the
    call to gdk_x11_drawable_get_xid().

    Also-- the makefile needs to be modified to link in
    glib-2.0, which requires this line to change:

    CONFIGLIB=pkg-config --libs gtk+-2.0 gthread-2.0 glib-2.0

     
  • Roy Wood
    Roy Wood
    2006-05-28

     
    Attachments
  • Roy Wood
    Roy Wood
    2006-05-28

    Updated makefile which forces linking of glib-2.0 libraries

     
    Attachments
  • Neil Hodgson
    Neil Hodgson
    2006-05-29

    • milestone: --> Feature_Request
    • priority: 5 --> 2
    • assigned_to: nobody --> nyamatongwe
     
  • Neil Hodgson
    Neil Hodgson
    2006-06-13

    Logged In: YES
    user_id=12579

    Wouldn't it be better to ask SciTE to front itself?

     
  • Roy Wood
    Roy Wood
    2006-06-13

    Logged In: YES
    user_id=24927

    I'd be happy to do that, if you prefer.

    The only argument for making the window id available would
    be that it is more open-ended, allowing other potential
    control actions for a Director app (pretty much anything the
    EWMH spec allows).

    Let me know which way you prefer.....

     
  • Neil Hodgson
    Neil Hodgson
    2006-06-13

    Logged In: YES
    user_id=12579

    "Open-ended" is also the argument against making the ID
    available. I've received bug reports on Windows where people
    try to use $(WindowID) to manipulate the application and
    failed and I'd like to avoid the support costs (a big factor
    nowadays) of opening this up. Another thing I don't like is
    that this is an X feature rather than a GTK+ feature so is
    lower level and less portable.
    Automatic activation/fronting of applications became a big
    problem on Windows to the extent that Microsoft blocked or
    added extra rules to some of the APIs in recent Windows
    versions. I don't know if this has happened on X yet, but
    expect it will and it will be more complex there as there
    are multiple window managers to be compatible with. One of
    the rules is that inactive applications should not front
    themselves (or can not but its messier than that). This is
    actually an argument against adding a "front" command to
    SciTE but doing the right thing on each platform requires
    investigating what the current best practices are.

     
  • Neil Hodgson
    Neil Hodgson
    2007-03-06

    • status: open --> closed-rejected