[PATCH] make edge-flip work on resolution-change
- From: Christopher Roy Bratusek <zanghar freenet de>
- To: sawfish-list gnome org
- Subject: [PATCH] make edge-flip work on resolution-change
- Date: Sun, 1 Aug 2010 10:24:24 +0200
Hi all,
I wrote a patch that makes edge-flip work on resolution-change.
Check it and tell me wether it's ok.
Chris
diff --git a/src/flippers.c b/src/flippers.c
index 9c5f9be..4f17c22 100644
--- a/src/flippers.c
+++ b/src/flippers.c
@@ -96,7 +96,7 @@ event_handler (XEvent *ev)
}
}
-DEFUN("flippers-after-restacking", Fflippers_after_restacking,
+DEFUN("flippers-after-restacking", Fflippers_after_restacking,
Sflippers_after_restacking, (void), rep_Subr0)
{
/* Must keep edge windows raised so they always get the pointer */
@@ -126,6 +126,32 @@ create_flipper (Window parent, int x, int y, int width, int height)
return w;
}
+DEFUN("create-flippers", Fcreate_flippers,
+ Screate_flippers, (void), rep_Subr0)
+{
+
+ edge_left = create_flipper (root_window, 0, 0, 1, screen_height);
+ edge_right = create_flipper (root_window, screen_width - 1, 0,
+ 1, screen_height);
+
+ edge_top = create_flipper (root_window, 0, 0, screen_width, 1);
+ edge_bottom = create_flipper (root_window, 0, screen_height - 1,
+ screen_width, 1);
+
+ return Qt;
+
+}
+
+DEFUN("restart-flippers", Frestart_flippers,
+ Srestart_flippers, (void), rep_Subr0)
+{
+
+ Fdisable_flippers();
+ Fcreate_flippers();
+ Fenable_flippers();
+
+}
+
repv
rep_dl_init (void)
{
@@ -134,6 +160,8 @@ rep_dl_init (void)
rep_ADD_SUBR(Senable_flippers);
rep_ADD_SUBR(Sdisable_flippers);
rep_ADD_SUBR(Sflippers_after_restacking);
+ rep_ADD_SUBR(Srestart_flippers);
+ rep_ADD_SUBR(Screate_flippers);
rep_INTERN (left);
rep_INTERN (right);
@@ -144,15 +172,13 @@ rep_dl_init (void)
if (!batch_mode_p ())
{
- edge_left = create_flipper (root_window, 0, 0, 1, screen_height);
- edge_right = create_flipper (root_window, screen_width - 1, 0,
- 1, screen_height);
- edge_top = create_flipper (root_window, 0, 0, screen_width, 1);
- edge_bottom = create_flipper (root_window, 0, screen_height - 1,
- screen_width, 1);
+
+ Fcreate_flippers();
add_hook (Qafter_restacking_hook, rep_VAL(&Sflippers_after_restacking));
- Fenable_flippers ();
+ add_hook (Qrandr_change_notify_hook, rep_VAL(&Srestart_flippers));
+
+ Fenable_flippers;
}
return rep_pop_structure (tem);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]