diff options
| author | Po Lu | 2022-05-07 06:17:46 +0000 |
|---|---|---|
| committer | Po Lu | 2022-05-07 06:18:02 +0000 |
| commit | a775528d17ce4cb070c36af1023a2dfecad24569 (patch) | |
| tree | 06484b2f8e1c2c6b5dfaae870ef4a4a79cd7ed97 /src | |
| parent | d14d86696e0f43e872291f592727538193153a51 (diff) | |
| download | emacs-a775528d17ce4cb070c36af1023a2dfecad24569.tar.gz emacs-a775528d17ce4cb070c36af1023a2dfecad24569.zip | |
Implement `sticky' frame parameter on Haiku
* src/haiku_support.cc (BWindow_set_sticky): New function.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (haiku_set_sticky, haiku_frame_parm_handlers):
New frame param handler.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haiku_support.cc | 15 | ||||
| -rw-r--r-- | src/haiku_support.h | 1 | ||||
| -rw-r--r-- | src/haikufns.c | 11 |
3 files changed, 26 insertions, 1 deletions
diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 300a78cd73b..105da3969ff 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc | |||
| @@ -5067,3 +5067,18 @@ be_select_font (void (*process_pending_signals_function) (void), | |||
| 5067 | 5067 | ||
| 5068 | return true; | 5068 | return true; |
| 5069 | } | 5069 | } |
| 5070 | |||
| 5071 | void | ||
| 5072 | BWindow_set_sticky (void *window, bool sticky) | ||
| 5073 | { | ||
| 5074 | BWindow *w = (BWindow *) window; | ||
| 5075 | |||
| 5076 | if (w->LockLooper ()) | ||
| 5077 | { | ||
| 5078 | w->SetFlags (sticky ? (w->Flags () | ||
| 5079 | | B_SAME_POSITION_IN_ALL_WORKSPACES) | ||
| 5080 | : w->Flags () & ~B_SAME_POSITION_IN_ALL_WORKSPACES); | ||
| 5081 | |||
| 5082 | w->UnlockLooper (); | ||
| 5083 | } | ||
| 5084 | } | ||
diff --git a/src/haiku_support.h b/src/haiku_support.h index 1433783c9fb..5ded9300d8a 100644 --- a/src/haiku_support.h +++ b/src/haiku_support.h | |||
| @@ -504,6 +504,7 @@ extern bool BWindow_is_active (void *); | |||
| 504 | extern void BWindow_set_override_redirect (void *, bool); | 504 | extern void BWindow_set_override_redirect (void *, bool); |
| 505 | extern void BWindow_dimensions (void *, int *, int *); | 505 | extern void BWindow_dimensions (void *, int *, int *); |
| 506 | extern void BWindow_set_z_group (void *, enum haiku_z_group); | 506 | extern void BWindow_set_z_group (void *, enum haiku_z_group); |
| 507 | extern void BWindow_set_sticky (void *, bool); | ||
| 507 | extern void BWindow_Flush (void *); | 508 | extern void BWindow_Flush (void *); |
| 508 | 509 | ||
| 509 | extern void BFont_close (void *); | 510 | extern void BFont_close (void *); |
diff --git a/src/haikufns.c b/src/haikufns.c index 2f26623fa5c..8596317de25 100644 --- a/src/haikufns.c +++ b/src/haikufns.c | |||
| @@ -1783,6 +1783,15 @@ haiku_set_inhibit_double_buffering (struct frame *f, | |||
| 1783 | unblock_input (); | 1783 | unblock_input (); |
| 1784 | } | 1784 | } |
| 1785 | 1785 | ||
| 1786 | static void | ||
| 1787 | haiku_set_sticky (struct frame *f, Lisp_Object new_value, | ||
| 1788 | Lisp_Object old_value) | ||
| 1789 | { | ||
| 1790 | block_input (); | ||
| 1791 | BWindow_set_sticky (FRAME_HAIKU_WINDOW (f), !NILP (new_value)); | ||
| 1792 | unblock_input (); | ||
| 1793 | } | ||
| 1794 | |||
| 1786 | 1795 | ||
| 1787 | 1796 | ||
| 1788 | DEFUN ("haiku-set-mouse-absolute-pixel-position", | 1797 | DEFUN ("haiku-set-mouse-absolute-pixel-position", |
| @@ -2713,7 +2722,7 @@ frame_parm_handler haiku_frame_parm_handlers[] = | |||
| 2713 | gui_set_fullscreen, | 2722 | gui_set_fullscreen, |
| 2714 | gui_set_font_backend, | 2723 | gui_set_font_backend, |
| 2715 | gui_set_alpha, | 2724 | gui_set_alpha, |
| 2716 | NULL, /* set sticky */ | 2725 | haiku_set_sticky, |
| 2717 | NULL, /* set tool bar pos */ | 2726 | NULL, /* set tool bar pos */ |
| 2718 | haiku_set_inhibit_double_buffering, | 2727 | haiku_set_inhibit_double_buffering, |
| 2719 | haiku_set_undecorated, | 2728 | haiku_set_undecorated, |