* 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.
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.
Lisp_Object Qtty, Qtty_type;
Lisp_Object Qfullscreen, Qfullwidth, Qfullheight, Qfullboth, Qmaximized;
+Lisp_Object Qsticky;
Lisp_Object Qfont_backend;
Lisp_Object Qalpha;
{"wait-for-wm", &Qwait_for_wm},
{"fullscreen", &Qfullscreen},
{"font-backend", &Qfont_backend},
- {"alpha", &Qalpha}
+ {"alpha", &Qalpha},
+ {"sticky", &Qsticky},
};
#ifdef HAVE_WINDOW_SYSTEM
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 */
};
0, /* x_set_wait_for_wm, */
x_set_fullscreen,
x_set_font_backend,
- x_set_alpha
+ x_set_alpha,
+ 0, /* x_set_sticky */
};
void
x_set_wait_for_wm,
x_set_fullscreen,
x_set_font_backend,
- x_set_alpha
+ x_set_alpha,
+ x_set_sticky,
};
void
: 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
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 *));