Added _gtk_widget_get_wmclass() internal function

Needed by GtkPlug
This commit is contained in:
Javier Jardón 2010-08-29 18:53:39 +02:00
parent 6250627d9e
commit 304b1a1f56
3 changed files with 21 additions and 3 deletions

View File

@ -33,6 +33,7 @@
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkplugprivate.h"
#include "gtkwindow.h"
/**
* SECTION:gtkplug
@ -634,16 +635,20 @@ gtk_plug_realize (GtkWidget *widget)
GtkWindow *window = GTK_WINDOW (widget);
GdkWindow *gdk_window;
GdkWindowAttr attributes;
const gchar *title;
gchar *wmclass_name, *wmclass_class;
gint attributes_mask;
gtk_widget_set_realized (widget, TRUE);
title = gtk_window_get_title (window);
_gtk_window_get_wmclass (window, &wmclass_name, &wmclass_class);
gtk_widget_get_allocation (widget, &allocation);
attributes.window_type = GDK_WINDOW_CHILD; /* XXX GDK_WINDOW_PLUG ? */
attributes.title = window->title;
attributes.wmclass_name = window->wmclass_name;
attributes.wmclass_class = window->wmclass_class;
attributes.title = (gchar *) title;
attributes.wmclass_name = wmclass_name;
attributes.wmclass_class = wmclass_class;
attributes.width = allocation.width;
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;

View File

@ -8784,3 +8784,12 @@ gtk_window_set_mnemonics_visible (GtkWindow *window,
priv->mnemonics_visible_set = TRUE;
}
void
_gtk_window_get_wmclass (GtkWindow *window,
gchar **wmclass_name,
gchar **wmclass_class)
{
*wmclass_name = window->wmclass_name;
*wmclass_class = window->wmclass_class;
}

View File

@ -433,6 +433,10 @@ void _gtk_window_set_is_active (GtkWindow *window,
void _gtk_window_set_is_toplevel (GtkWindow *window,
gboolean is_toplevel);
void _gtk_window_get_wmclass (GtkWindow *window,
gchar **wmclass_name,
gchar **wmclass_class);
typedef void (*GtkWindowKeysForeachFunc) (GtkWindow *window,
guint keyval,
GdkModifierType modifiers,