Commit 304b1a1f authored by Javier Jardon's avatar Javier Jardon

Added _gtk_widget_get_wmclass() internal function

Needed by GtkPlug
parent 6250627d
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "gtkintl.h" #include "gtkintl.h"
#include "gtkprivate.h" #include "gtkprivate.h"
#include "gtkplugprivate.h" #include "gtkplugprivate.h"
#include "gtkwindow.h"
/** /**
* SECTION:gtkplug * SECTION:gtkplug
...@@ -634,16 +635,20 @@ gtk_plug_realize (GtkWidget *widget) ...@@ -634,16 +635,20 @@ gtk_plug_realize (GtkWidget *widget)
GtkWindow *window = GTK_WINDOW (widget); GtkWindow *window = GTK_WINDOW (widget);
GdkWindow *gdk_window; GdkWindow *gdk_window;
GdkWindowAttr attributes; GdkWindowAttr attributes;
const gchar *title;
gchar *wmclass_name, *wmclass_class;
gint attributes_mask; gint attributes_mask;
gtk_widget_set_realized (widget, TRUE); 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); gtk_widget_get_allocation (widget, &allocation);
attributes.window_type = GDK_WINDOW_CHILD; /* XXX GDK_WINDOW_PLUG ? */ attributes.window_type = GDK_WINDOW_CHILD; /* XXX GDK_WINDOW_PLUG ? */
attributes.title = window->title; attributes.title = (gchar *) title;
attributes.wmclass_name = window->wmclass_name; attributes.wmclass_name = wmclass_name;
attributes.wmclass_class = window->wmclass_class; attributes.wmclass_class = wmclass_class;
attributes.width = allocation.width; attributes.width = allocation.width;
attributes.height = allocation.height; attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT; attributes.wclass = GDK_INPUT_OUTPUT;
......
...@@ -8784,3 +8784,12 @@ gtk_window_set_mnemonics_visible (GtkWindow *window, ...@@ -8784,3 +8784,12 @@ gtk_window_set_mnemonics_visible (GtkWindow *window,
priv->mnemonics_visible_set = TRUE; 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;
}
...@@ -433,6 +433,10 @@ void _gtk_window_set_is_active (GtkWindow *window, ...@@ -433,6 +433,10 @@ void _gtk_window_set_is_active (GtkWindow *window,
void _gtk_window_set_is_toplevel (GtkWindow *window, void _gtk_window_set_is_toplevel (GtkWindow *window,
gboolean is_toplevel); gboolean is_toplevel);
void _gtk_window_get_wmclass (GtkWindow *window,
gchar **wmclass_name,
gchar **wmclass_class);
typedef void (*GtkWindowKeysForeachFunc) (GtkWindow *window, typedef void (*GtkWindowKeysForeachFunc) (GtkWindow *window,
guint keyval, guint keyval,
GdkModifierType modifiers, GdkModifierType modifiers,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment