# Window stacking order not changeable?

**URL:** <https://www.ruby-forum.com/t/window-stacking-order-not-changeable/240783>\
**Category:** Ruby-Gnome 2\
**Created:** [April 30, 2014, 9:22am UTC](https://www.ruby-forum.com/t/window-stacking-order-not-changeable/240783 "2014-04-30T09:22:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [April 30, 2014, 9:22am UTC](https://www.ruby-forum.com/t/window-stacking-order-not-changeable/240783/1 "2014-04-30T09:22:15Z")

</div>

I’ve got a bunch of non-modal windows that cause other windows to open -  
sometimes via show(self) and sometimes via double-clicking in a  
ListView.

The windows are stacked strangely - some of them open behind others.

More strangeness: When I click on a window, it does not come to the  
front.

Yet more: For some windows, when I minimize and then restore, it does  
come to the front; other windows don’t.

Bonus strangeness: some windows can be individually minimized; some  
windows take others with them when they are minimized.

Any thoughts on what could be causing any of this, or how to get control  
of it?

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![mahadewa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@mahadewa](https://www.ruby-forum.com/u/mahadewa)\
**Post date:** [May 3, 2014, 1:16am UTC](https://www.ruby-forum.com/t/window-stacking-order-not-changeable/240783/2 "2014-05-03T01:16:17Z")

</div>

Refer to the example project child\_window in visualruby. That shows how  
to open windows.

I’m guessing that you’re calling the show() method twice in your code  
because you’re dealing with non-modal windows.

E

---

<div class="post-metadata">

**Author:** ![mahadewa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@mahadewa](https://www.ruby-forum.com/u/mahadewa)\
**Post date:** [May 3, 2014, 3:18am UTC](https://www.ruby-forum.com/t/window-stacking-order-not-changeable/240783/3 "2014-05-03T03:18:52Z")

</div>

No, actually I was passing in self to the show() method because that’s  
how it used to be done for non-modal windows. (Or something like that.)  
Anyway, passing no parameters to show() fixed the problem.

Thanks!
