Commit cad9ef74 authored by Jan Djärv's avatar Jan Djärv

* 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.
parent 69b16610
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.
......
......@@ -121,6 +121,7 @@ Lisp_Object Qtty_color_mode;
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 @@ static struct frame_parm_table frame_parms[] =
{"wait-for-wm", &Qwait_for_wm},
{"fullscreen", &Qfullscreen},
{"font-backend", &Qfont_backend},
{"alpha", &Qalpha}
{"alpha", &Qalpha},
{"sticky", &Qsticky},
};
#ifdef HAVE_WINDOW_SYSTEM
......
......@@ -1031,7 +1031,8 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
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 */
};
......
......@@ -6892,7 +6892,8 @@ frame_parm_handler w32_frame_parm_handlers[] =
0, /* x_set_wait_for_wm, */
x_set_fullscreen,
x_set_font_backend,
x_set_alpha
x_set_alpha,
0, /* x_set_sticky */
};
void
......
......@@ -5779,7 +5779,8 @@ frame_parm_handler x_frame_parm_handlers[] =
x_set_wait_for_wm,
x_set_fullscreen,
x_set_font_backend,
x_set_alpha
x_set_alpha,
x_set_sticky,
};
void
......
......@@ -8456,6 +8456,18 @@ set_wm_state (frame, add, what, what2)
: 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
......
......@@ -964,6 +964,8 @@ extern unsigned int x_x_to_emacs_modifiers P_ ((struct x_display_info *,
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 *));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment