* xterm.h (struct x_display_info): Add Xatom_net_wm_state_sticky

* xterm.c (x_handle_net_wm_state): Also look for sticky.
(x_term_init): Initialize Xatom_net_wm_state_sticky.

* frame.h: Declare Qsticky.
This commit is contained in:
Jan Djärv 2009-07-01 16:58:05 +00:00
parent 17db8e10a2
commit acd51077ea
4 changed files with 17 additions and 2 deletions

View file

@ -1,5 +1,12 @@
2009-07-01 Jan Djärv <jan.h.d@swipnet.se>
* xterm.h (struct x_display_info): Add Xatom_net_wm_state_sticky
* xterm.c (x_handle_net_wm_state): Also look for sticky.
(x_term_init): Initialize Xatom_net_wm_state_sticky.
* frame.h: Declare Qsticky.
* w32fns.c (w32_frame_parm_handlers): Set 0 for sticky.
* nsfns.m (ns_frame_parm_handlers): Ditto.

View file

@ -1039,6 +1039,7 @@ extern Lisp_Object Qline_spacing;
extern Lisp_Object Qwait_for_wm;
extern Lisp_Object Qfullscreen;
extern Lisp_Object Qfullwidth, Qfullheight, Qfullboth, Qmaximized;
extern Lisp_Object Qsticky;
extern Lisp_Object Qfont_backend;
extern Lisp_Object Qalpha;

View file

@ -8547,6 +8547,7 @@ x_handle_net_wm_state (f, event)
unsigned char *tmp_data = NULL;
Atom target_type = XA_ATOM;
Lisp_Object lval;
int sticky = 0;
BLOCK_INPUT;
x_catch_errors (dpy);
@ -8584,6 +8585,8 @@ x_handle_net_wm_state (f, event)
}
else if (a == dpyinfo->Xatom_net_wm_state_fullscreen_atom)
value = FULLSCREEN_BOTH;
else if (a == dpyinfo->Xatom_net_wm_state_sticky)
sticky = 1;
}
lval = Qnil;
@ -8604,7 +8607,8 @@ x_handle_net_wm_state (f, event)
}
store_frame_param (f, Qfullscreen, lval);
store_frame_param (f, Qsticky, sticky ? Qt : Qnil);
if (tmp_data) XFree (tmp_data);
UNBLOCK_INPUT;
}
@ -10295,6 +10299,8 @@ x_term_init (display_name, xrm_option, resource_name)
= XInternAtom (dpyinfo->display, "_NET_WM_STATE_MAXIMIZED_HORZ", False);
dpyinfo->Xatom_net_wm_state_maximized_vert
= XInternAtom (dpyinfo->display, "_NET_WM_STATE_MAXIMIZED_VERT", False);
dpyinfo->Xatom_net_wm_state_sticky
= XInternAtom (dpyinfo->display, "_NET_WM_STATE_STICKY", False);
dpyinfo->cut_buffers_initialized = 0;

View file

@ -359,7 +359,8 @@ struct x_display_info
/* Atoms dealing with maximization and fullscreen */
Atom Xatom_net_wm_state, Xatom_net_wm_state_fullscreen_atom,
Xatom_net_wm_state_maximized_horz, Xatom_net_wm_state_maximized_vert;
Xatom_net_wm_state_maximized_horz, Xatom_net_wm_state_maximized_vert,
Xatom_net_wm_state_sticky;
};
#ifdef HAVE_X_I18N