Re: how to hide the hide button in titlebar



Hi Luca,

On Wed, 2005-09-14 at 18:54 +0200, Luca Guglielmetti wrote:
> Hi all
> I will hide the hide-button in the titlebar of a window, but in the
> window.h class I can't find any function to do that


The relevant functions are in the include file gdkmm/window.h as far as
I can see. I think you can only set hints for the window manager, the WM
may ignore them.

Excerpt from gdkmm/window.h:

  /** This function isn't really good for much. It sets the traditional
   * Motif window manager hint for which operations the window manager
   * should allow on a toplevel window. However, few window managers do
   * anything reliable or interesting with this hint. Many ignore it
   * entirely.
   *
   * The @a functions  argument is the logical OR of values from the
   * Gdk::WMFunction enumeration. If the bitmask includes Gdk::FUNC_ALL,
   * then the other bits indicate which functions to disable; if
   * it doesn't include Gdk::FUNC_ALL, it indicates which functions to
   * enable.
   * @param functions Bitmask of operations to allow on @a window .
   */
  void set_functions(WMFunction functions);



The following POC does not work for me, I don't know why (I get a
SIGSEGV from gdkmm but I have no debugging symbols enabled so this does
not really help.)

This was not really helpful, but if you absolutely need this
functionality this could be a good starting point.


#include <gtkmm.h>

int main(int argc, char *argv[])
{
	Gtk::Main kit(argc, argv);
	Gtk::Window *window = new Gtk::Window();
	Gdk::Window* gw = dynamic_cast<Gdk::Window*>(window);
	gw->set_functions( Gdk::FUNC_ALL | Gdk::FUNC_MINIMIZE );
	window->show_all();
	Gtk::Main::run(*window);
	return 0;
}



best,


-- 
Matthias Kestenholz
mk irregular ch
http://blog.irregular.ch/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]