Commit c3d16d02 authored by Yuanle Song's avatar Yuanle Song
Browse files

update doc. add a bug about full screen mode app

parent 6b5eb38f
Loading
Loading
Loading
Loading
+112 −1
Original line number Diff line number Diff line
* COMMENT -*- mode: org -*-
#+Date: 2019-09-02
Time-stamp: <2020-06-03>
Time-stamp: <2022-08-29>
#+STARTUP: content
* notes                                                               :entry:
** 2020-06-03 how to make a release?
@@ -39,6 +39,117 @@ Time-stamp: <2020-06-03>
  G_MESSAGES_DEBUG=all ./zero-panel

* later                                                               :entry:
** 2022-08-29 config zero-panel to always shown on-top in full screen mode window.
- when emacs run in full screen mode. (press f11 on my laptop) zero-panel
  can't show on top of emacs window.

  I already have
  gtk_window_set_keep_above(GTK_WINDOW(appdata->window), TRUE);

  search: window can't show on top in emacs toggle-frame-fullscreen

  Gtk.Window.set_keep_above
  https://docs.gtk.org/gtk3/method.Window.set_keep_above.html

  try call it once after user toggle full screen in emacs.
  nope. it didn't work.

- search: show window on top of emacs fullscreen mode

  xfce - How to make new window get the focus when Emacs in full-screen mode in Xfce4? - Unix & Linux Stack Exchange
  https://unix.stackexchange.com/questions/362427/how-to-make-new-window-get-the-focus-when-emacs-in-full-screen-mode-in-xfce4

  search: gtk bring a window on top

  How to pop up a GTK window/widget on top of a full screen application of a different process in Linux? - Stack Overflow
  https://stackoverflow.com/questions/50626271/how-to-pop-up-a-gtk-window-widget-on-top-of-a-full-screen-application-of-a-diffe

  You'll have to integrate B into the window manager somehow, and not make it
  as a standalone application.

  search: gtk how to mark a window not a standalone application?

  gtk_window_set_type_hint(GTK_WINDOW(appdata->window), GDK_WINDOW_TYPE_HINT_DIALOG);

  all type hints
  https://docs.gtk.org/gdk3/enum.WindowTypeHint.html
  GDK_WINDOW_TYPE_HINT_DOCK

  add pager and taskbar skip hints.

  // how did my app not shown in taskbar? I didn't put any type hint.
  // type hint is specified in themes/*.ui file.
  // I also have
    <property name="skip-taskbar-hint">True</property>
    <property name="skip-pager-hint">True</property>

  xprop

  _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_TOOLTIP

  tried other type hint. none works.
  GDK_WINDOW_TYPE_HINT_POPUP_MENU
  GDK_WINDOW_TYPE_HINT_NOTIFICATION
  GDK_WINDOW_TYPE_HINT_DOCK

- it's not emacs specific. the window also doesn't show up when firefox is in
  full screen mode.

  how does ibus/fcitx solve it?
  check fcitx source code.

  fcitx/src/ui at master · fcitx/fcitx · GitHub
  https://github.com/fcitx/fcitx/tree/master/src/ui
  classic
  kimpanel

  // I remember kimpanel. it's a KDE component.

  src/ui/classic/InputWindow.h
  src/ui/classic/InputWindow.c
  This is the Preedit Window for Input

  #+BEGIN_SRC c
    void InputWindowShow(InputWindow* inputWindow)
    {
	if (!WindowIsVisable(inputWindow->parent.owner->dpy, inputWindow->parent.wId))
	    InputWindowMoveWindow(&inputWindow->parent);
	XMapRaised(inputWindow->parent.owner->dpy, inputWindow->parent.wId);
	FcitxXlibWindowPaint(&inputWindow->parent);
    }
  #+END_SRC

  where is XMapRaised defined?
  https://www.systutorials.com/docs/linux/man/3-XMapRaised/
  man XMapRaised(3)
  Xlib - C Language X Interface

  int XMapRaised(Display *display, Window w);

  how to call this in gtk?
  search: how to call XMapRaised in gtk?

  gtk_window_present ()
  gtk_window_present_with_time ()

  try this. I think it should send a map request.

  /* I can't get panel to show in firefox/emacs full screen mode */
  /* gtk_window_present_with_time(GTK_WINDOW(appdata->window), GDK_CURRENT_TIME); */

- I can't find this.
  maybe fix this when porting to wayland server.

- problems
  - how to get timestamp for gtk_window_present_with_time() call?
    its type is guint32.

    https://code.woboq.org/gtk/gtk/gtk/gtkwindow.c.html

    just use GDK_CURRENT_TIME.

    it's not working.

** 2019-09-03 bug: panel window should not get focus in GNOME 3 on Wayland.
currently panel keeps flashing when typing in this env.