Re: Remove Minimize Button from GTK Window?



Thanks for the feedback.  The production code has been pushed out
already and the production machine is no longer available, but I will
see if I can reconstruct the problem on a new machine.   Thanks again,
Mitchell

On Mon, Jul 1, 2013 at 5:09 PM, Jasper St. Pierre <jstpierre mecheye net>
Looking through the Compiz code, Compiz *should* be respecting the hints. Itt
which the decorator (which I believe is unity-window-decorator in the
version of Ubuntu you have) then picks up (through libwnck) and paints the
minimize button on the frame.

Can you check with xprop what the value of _NET_WM_ALLOWED_ACTIONS is on the
window?


On Mon, Jul 1, 2013 at 4:56 PM, richard boaz <ivor boaz gmail com> wrote:

hi,

i'm afraid that instructions to the WM are regarded as "advice" and that
the WM has no responsibility in actually honoring the request.

it can work one place, and not the other, sorry.

richard


On Mon, Jul 1, 2013 at 3:52 PM, Mitchell Verter
<mitchell verter gmail com> wrote:

Thanks so much for the advice, but it wound up not working.

In gtkwindow.c::gtk_window_realize, I inserterted the following line:
========
  gdk_window_set_functions (widget->window, GDK_FUNC_ALL |
GDK_FUNC_MINIMIZE);
--------------

This effectively removed the minimize button from window on my
DEVELOPMENT machine, which was running Ubuntu 11.04, Metacity Window
Manager.

I didn't realize, though, that the PRODUCTION machine was running
Ubuntu 11.04 with a Compiz Window Manager.  The Minimize Button was
still there!!!  Luckily, I was able to use ccsm (Compiz Settings
Manager) to disappear the button.

But why didn't it work in the first place?  Why didn't the fix
transfer to a new Window Manager?  Would there have been a better way
to hack the code to make the Minimize Button dissappear on all
platforms and window managers?

THanks
Mitchell

On Fri, Jun 21, 2013 at 3:58 PM, Jasper St. Pierre
<jstpierre mecheye net> wrote:
If you have a GdkWindow, you can tell the window manager to disable the
minimize button with MWM hints using gdk_window_set_functions along
with
GDK_FUNC_MINIMIZE.

On Fri, Jun 21, 2013 at 3:52 PM, Mitchell Verter
<mitchell verter gmail com>
wrote:

Is there any way to remove the "Minimize" button by hacking the
gtk+-2.24.18 code, or at least to prevent it from minimizing?

I have been fiddling around with gtkwindow.c and gtkwindow-decorate.c,
playing with gtk_window_iconify() and   GtkWindow:decorated (Whether
the
window should be decorated by the window manager) but nothing seems to
be
working.

I've read online that it's not, in fact, possible , and that this is
controlled by  the window manager.  But I wanted to ask here before I
gave
up.

The system we are working on is Ubuntu 11.04.  I believe the window
manager is Metacity.

Thanks
Mitchell

_______________________________________________
gtk-list mailing list
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list




--
  Jasper
_______________________________________________
gtk-list mailing list
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list





--
  Jasper


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