0

I get 2 independent programs (A & B) on Linux Redhat, developed by Motif toolkit based on X window. These 2 programs all have there own human-machine-interface. and there come the questions: When displaying these 2 programs on the same desktop, how can i set one program's interface alway on the top-level? the current situation is when i run them on the same desktop, and i click on program A(fullscreen), the program B(one small window) will lower down behind the program A and cannot be seen unless using alt+Tab to change between them, which is unacceptable.

I want to display program B always on the top-level when click program A, it would not lower down. Or can i set the program B display on one window insert into program A? if it is possible, how to realize it on Motif X window? using motif x window in one program to display another program's interface.

Looking forward to ur advice, even i know there are few people still using Motif as a toolkit to build an interface. but it is too hard to rebuild the whole program which is an industrial-grade product.

  • 1
    Isn't stacking windows the job of the window manager? Which one are you using? – the busybee Sep 17 '19 at 06:11
  • User's response to an always-on-top application: "That **AlwaysOnTopApp** is such an annoying piece of !@!*%$, I'd nuke it from orbit if I weren't forced to use it!" – Andrew Henle Feb 20 '20 at 12:37

1 Answers1

0

You can programmatically make sure your window is on top by calling

XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel));

(Assuming toplevel is your toplevel widget).

Whether this stays on top forever is most probably controlled by the window manager. If that happens to be mwm, the you can try to call

XtVaSetValues(toplevel, XmNmwmInputMode, MWM_INPUT_SYSTEM_MODAL, NULL);
Marc Balmer
  • 1,780
  • 1
  • 11
  • 18