Mercurial > emacs
comparison src/xterm.c @ 103676:fbdd52a2e830
* 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.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Wed, 01 Jul 2009 16:58:05 +0000 |
parents | 1867be80e595 |
children | 6cf0c4de552b |
comparison
equal
deleted
inserted
replaced
103675:f1e5b911b357 | 103676:fbdd52a2e830 |
---|---|
8545 long max_len = 65536; | 8545 long max_len = 65536; |
8546 Display *dpy = FRAME_X_DISPLAY (f); | 8546 Display *dpy = FRAME_X_DISPLAY (f); |
8547 unsigned char *tmp_data = NULL; | 8547 unsigned char *tmp_data = NULL; |
8548 Atom target_type = XA_ATOM; | 8548 Atom target_type = XA_ATOM; |
8549 Lisp_Object lval; | 8549 Lisp_Object lval; |
8550 int sticky = 0; | |
8550 | 8551 |
8551 BLOCK_INPUT; | 8552 BLOCK_INPUT; |
8552 x_catch_errors (dpy); | 8553 x_catch_errors (dpy); |
8553 rc = XGetWindowProperty (dpy, event->window, | 8554 rc = XGetWindowProperty (dpy, event->window, |
8554 event->atom, 0, max_len, False, target_type, | 8555 event->atom, 0, max_len, False, target_type, |
8582 else | 8583 else |
8583 value = FULLSCREEN_HEIGHT; | 8584 value = FULLSCREEN_HEIGHT; |
8584 } | 8585 } |
8585 else if (a == dpyinfo->Xatom_net_wm_state_fullscreen_atom) | 8586 else if (a == dpyinfo->Xatom_net_wm_state_fullscreen_atom) |
8586 value = FULLSCREEN_BOTH; | 8587 value = FULLSCREEN_BOTH; |
8588 else if (a == dpyinfo->Xatom_net_wm_state_sticky) | |
8589 sticky = 1; | |
8587 } | 8590 } |
8588 | 8591 |
8589 lval = Qnil; | 8592 lval = Qnil; |
8590 switch (value) | 8593 switch (value) |
8591 { | 8594 { |
8602 lval = Qmaximized; | 8605 lval = Qmaximized; |
8603 break; | 8606 break; |
8604 } | 8607 } |
8605 | 8608 |
8606 store_frame_param (f, Qfullscreen, lval); | 8609 store_frame_param (f, Qfullscreen, lval); |
8607 | 8610 store_frame_param (f, Qsticky, sticky ? Qt : Qnil); |
8611 | |
8608 if (tmp_data) XFree (tmp_data); | 8612 if (tmp_data) XFree (tmp_data); |
8609 UNBLOCK_INPUT; | 8613 UNBLOCK_INPUT; |
8610 } | 8614 } |
8611 | 8615 |
8612 /* Check if we need to resize the frame due to a fullscreen request. | 8616 /* Check if we need to resize the frame due to a fullscreen request. |
10293 = XInternAtom (dpyinfo->display, "_NET_WM_STATE_FULLSCREEN", False); | 10297 = XInternAtom (dpyinfo->display, "_NET_WM_STATE_FULLSCREEN", False); |
10294 dpyinfo->Xatom_net_wm_state_maximized_horz | 10298 dpyinfo->Xatom_net_wm_state_maximized_horz |
10295 = XInternAtom (dpyinfo->display, "_NET_WM_STATE_MAXIMIZED_HORZ", False); | 10299 = XInternAtom (dpyinfo->display, "_NET_WM_STATE_MAXIMIZED_HORZ", False); |
10296 dpyinfo->Xatom_net_wm_state_maximized_vert | 10300 dpyinfo->Xatom_net_wm_state_maximized_vert |
10297 = XInternAtom (dpyinfo->display, "_NET_WM_STATE_MAXIMIZED_VERT", False); | 10301 = XInternAtom (dpyinfo->display, "_NET_WM_STATE_MAXIMIZED_VERT", False); |
10302 dpyinfo->Xatom_net_wm_state_sticky | |
10303 = XInternAtom (dpyinfo->display, "_NET_WM_STATE_STICKY", False); | |
10298 | 10304 |
10299 dpyinfo->cut_buffers_initialized = 0; | 10305 dpyinfo->cut_buffers_initialized = 0; |
10300 | 10306 |
10301 dpyinfo->x_dnd_atoms_size = 8; | 10307 dpyinfo->x_dnd_atoms_size = 8; |
10302 dpyinfo->x_dnd_atoms_length = 0; | 10308 dpyinfo->x_dnd_atoms_length = 0; |