changeset 103674:1867be80e595

* w32fns.c (w32_frame_parm_handlers): Set 0 for sticky. * nsfns.m (ns_frame_parm_handlers): Ditto. * frame.c: Declare Qsticky. (frame_parms): Add sticky. * xfns.c (x_frame_parm_handlers): Let x_set_sticky handle sticky. * xterm.h: Declare x_set_sticky. * xterm.c (x_set_sticky): New function. * frame.c: Qmaximized is new. (x_set_frame_parameters): Do not handle fullscreen specially. Only set width and height if explicitly set. (x_set_fullscreen): Handle Qmaximized. (x_set_font, x_figure_window_size): Do not handle fullscreen specially. (syms_of_frame): Initialize Qmaximized. * xterm.c (handle_one_xevent): Remove call to x_check_fullscreen for Expose event. Add call to x_check_fullscreen for MapNotify event. Remove all code w.r.t. fullscreen from ConfigureNotify event. Do not set gravity to NorthWestGravity when USE_GTK. (set_wm_state): New function. (do_ewmh_fullscreen): Use set_wm_state. Also handle FULLSCREEN_MAXIMIZED. (x_handle_net_wm_state): Handle FULLSCREEN_MAXIMIZED. (x_check_fullscreen): Simplify so we only handle EMWH type of fullscreen or the case when no window manager is running. That means remove calls to x_real_positions and x_fullscreen_adjust.
author Jan Djärv <jan.h.d@swipnet.se>
date Wed, 01 Jul 2009 16:48:35 +0000
parents 34f3338fd2bf
children f1e5b911b357
files src/ChangeLog src/frame.c src/nsfns.m src/w32fns.c src/xfns.c src/xterm.c src/xterm.h
diffstat 7 files changed, 36 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Jul 01 15:52:58 2009 +0000
+++ b/src/ChangeLog	Wed Jul 01 16:48:35 2009 +0000
@@ -1,5 +1,18 @@
 2009-07-01  Jan Djärv  <jan.h.d@swipnet.se>
 
+	* w32fns.c (w32_frame_parm_handlers): Set 0 for sticky.
+
+	* nsfns.m (ns_frame_parm_handlers): Ditto.
+
+	* frame.c: Declare Qsticky.
+	(frame_parms): Add sticky.
+
+	* xfns.c (x_frame_parm_handlers): Let x_set_sticky handle sticky.
+
+	* xterm.h: Declare x_set_sticky.
+
+	* xterm.c (x_set_sticky): New function.
+
 	* gtkutil.c (xg_tool_bar_proxy_help_callback): New function.
 	(xg_tool_bar_menu_proxy): Attach enter/leave events to
 	xg_tool_bar_proxy_help_callback.
--- a/src/frame.c	Wed Jul 01 15:52:58 2009 +0000
+++ b/src/frame.c	Wed Jul 01 16:48:35 2009 +0000
@@ -121,6 +121,7 @@
 Lisp_Object Qtty, Qtty_type;
 
 Lisp_Object Qfullscreen, Qfullwidth, Qfullheight, Qfullboth, Qmaximized;
+Lisp_Object Qsticky;
 Lisp_Object Qfont_backend;
 Lisp_Object Qalpha;
 
@@ -2844,7 +2845,8 @@
   {"wait-for-wm",		&Qwait_for_wm},
   {"fullscreen",                &Qfullscreen},
   {"font-backend",		&Qfont_backend},
-  {"alpha",			&Qalpha}
+  {"alpha",			&Qalpha},
+  {"sticky",			&Qsticky},
 };
 
 #ifdef HAVE_WINDOW_SYSTEM
--- a/src/nsfns.m	Wed Jul 01 15:52:58 2009 +0000
+++ b/src/nsfns.m	Wed Jul 01 16:48:35 2009 +0000
@@ -1031,7 +1031,8 @@
   0, /* x_set_wait_for_wm, will ignore */
   0,  /* x_set_fullscreen will ignore */
   x_set_font_backend, /* generic OK */
-  x_set_alpha
+  x_set_alpha,
+  0, /* x_set_sticky */  
 };
 
 
--- a/src/w32fns.c	Wed Jul 01 15:52:58 2009 +0000
+++ b/src/w32fns.c	Wed Jul 01 16:48:35 2009 +0000
@@ -6892,7 +6892,8 @@
   0, /* x_set_wait_for_wm, */
   x_set_fullscreen,
   x_set_font_backend,
-  x_set_alpha
+  x_set_alpha,
+  0, /* x_set_sticky */
 };
 
 void
--- a/src/xfns.c	Wed Jul 01 15:52:58 2009 +0000
+++ b/src/xfns.c	Wed Jul 01 16:48:35 2009 +0000
@@ -5779,7 +5779,8 @@
   x_set_wait_for_wm,
   x_set_fullscreen,
   x_set_font_backend,
-  x_set_alpha
+  x_set_alpha,
+  x_set_sticky,
 };
 
 void
--- a/src/xterm.c	Wed Jul 01 15:52:58 2009 +0000
+++ b/src/xterm.c	Wed Jul 01 16:48:35 2009 +0000
@@ -8456,6 +8456,18 @@
                           : Qnil)));
 }
 
+void
+x_set_sticky (f, new_value, old_value)
+     struct frame *f;
+     Lisp_Object new_value, old_value;
+{
+  Lisp_Object frame;
+
+  XSETFRAME (frame, f);
+  set_wm_state (frame, NILP (new_value) ? 0 : 1,
+                "_NET_WM_STATE_STICKY", NULL);
+}
+
 /* Do fullscreen as specified in extended window manager hints */
 
 static int
--- a/src/xterm.h	Wed Jul 01 15:52:58 2009 +0000
+++ b/src/xterm.h	Wed Jul 01 16:48:35 2009 +0000
@@ -964,6 +964,8 @@
 extern int x_display_pixel_height P_ ((struct x_display_info *));
 extern int x_display_pixel_width P_ ((struct x_display_info *));
 
+extern void x_set_sticky P_ ((struct frame *, Lisp_Object, Lisp_Object));
+
 /* Defined in xselect.c */
 
 extern void x_handle_property_notify P_ ((XPropertyEvent *));