aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-05-17 21:47:55 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-05-17 21:47:55 +0800
commit36b6b34ca77a6349d90032e537d738e0233b7220 (patch)
treeeccf02037f9901cd3c6992e8c864875fc9c88928 /src/ephy-window.c
parent89064048e1d2895c16b0681de6692a12534a3a4d (diff)
downloadgsoc2013-epiphany-36b6b34ca77a6349d90032e537d738e0233b7220.tar
gsoc2013-epiphany-36b6b34ca77a6349d90032e537d738e0233b7220.tar.gz
gsoc2013-epiphany-36b6b34ca77a6349d90032e537d738e0233b7220.tar.bz2
gsoc2013-epiphany-36b6b34ca77a6349d90032e537d738e0233b7220.tar.lz
gsoc2013-epiphany-36b6b34ca77a6349d90032e537d738e0233b7220.tar.xz
gsoc2013-epiphany-36b6b34ca77a6349d90032e537d738e0233b7220.tar.zst
gsoc2013-epiphany-36b6b34ca77a6349d90032e537d738e0233b7220.zip
Use gtk api for fullscreen, not wm directly
2003-05-17 Marco Pesenti Gritti <marco@it.gnome.org> * src/ephy-window.c: (ephy_window_set_chrome): Use gtk api for fullscreen, not wm directly
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c61
1 files changed, 8 insertions, 53 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index b0d16d614..b8d3bc656 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -693,57 +693,6 @@ ephy_window_get_chrome (EphyWindow *window)
}
static void
-wmspec_change_state (gboolean add,
- GdkWindow *window,
- GdkAtom state1,
- GdkAtom state2)
-{
- XEvent xev;
-
- #define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
- #define _NET_WM_STATE_ADD 1 /* add/set property */
- #define _NET_WM_STATE_TOGGLE 2 /* toggle property */
-
- xev.xclient.type = ClientMessage;
- xev.xclient.serial = 0;
- xev.xclient.send_event = True;
- xev.xclient.display = gdk_display;
- xev.xclient.window = GDK_WINDOW_XID (window);
- xev.xclient.message_type = gdk_x11_get_xatom_by_name ("_NET_WM_STATE");
- xev.xclient.format = 32;
- xev.xclient.data.l[0] = add ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
- xev.xclient.data.l[1] = gdk_x11_atom_to_xatom (state1);
- xev.xclient.data.l[2] = gdk_x11_atom_to_xatom (state2);
-
- XSendEvent (gdk_display, GDK_WINDOW_XID (gdk_get_default_root_window ()),
- False,
- SubstructureRedirectMask | SubstructureNotifyMask,
- &xev);
-}
-
-static void
-window_set_fullscreen_mode (EphyWindow *window, gboolean active)
-{
- GdkWindow *gdk_window;
-
- gdk_window = GTK_WIDGET(window)->window;
-
- if (gdk_net_wm_supports (gdk_atom_intern ("_NET_WM_STATE_FULLSCREEN",
- FALSE)))
- {
- wmspec_change_state (active,
- gdk_window,
- gdk_atom_intern ("_NET_WM_STATE_FULLSCREEN",
- FALSE),
- GDK_NONE);
- }
- else
- {
- g_warning ("NET_WM_STATE_FULLSCREEN not supported");
- }
-}
-
-static void
translate_default_chrome (EmbedChromeMask *chrome_mask)
{
/* keep only not layout flags */
@@ -852,8 +801,14 @@ ephy_window_set_chrome (EphyWindow *window,
(flags & EMBED_CHROME_OPENASFULLSCREEN))
{
save_window_chrome (window);
- window_set_fullscreen_mode (window,
- flags & EMBED_CHROME_OPENASFULLSCREEN);
+ if (flags & EMBED_CHROME_OPENASFULLSCREEN)
+ {
+ gtk_window_fullscreen (GTK_WINDOW (window));
+ }
+ else
+ {
+ gtk_window_unfullscreen (GTK_WINDOW (window));
+ }
}
window->priv->chrome_mask = flags;