Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-07-10 16:18:57

woistmeinauto
Member
Registered: 2020-03-29
Posts: 54

Is it possible to position panel out of screen borders?

Title is self explanatory.

Offline

#2 2020-07-10 22:15:29

Troglodyte
Member
Registered: 2020-04-09
Posts: 17

Re: Is it possible to position panel out of screen borders?

I don't have an answer, but I'm insanely curious.  What are you achieve with this?

Offline

#3 2020-07-10 23:05:47

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Is it possible to position panel out of screen borders?

If you mean position a panel off-screen, then the answer is no. The best you can do is hide it and set the background to transparent. It will become invisible.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2020-07-11 08:53:29

Misko_2083
Member
Registered: 2015-10-13
Posts: 211
Website

Re: Is it possible to position panel out of screen borders?

I tried moving it with Xlib, but the window manager overides the position.
But the panel will minimize (iconify). smile

Debian: install libx11-dev

save next as toggle-minimize.c

/* 
 *
 * Minimize or map a window
 * 
 * toggle-minimize.c
 *
 * Compile with:
 * gcc toggle-minimize.c -Wall -o toggle-minimize `pkg-config --cflags --libs x11`
 *
 * Usage:
 * toggle-minimize 0x1234567
 *
 */

#include <stdio.h>
#include <X11/Xlib.h>
#include <stdbool.h>

int
main (int   argc,
      char *argv[])
{
  Display *display;
  Window window;
  XWindowAttributes attributes;

  display = XOpenDisplay (NULL);
  if (display == NULL)
    return 1;

  int screen = XDefaultScreen(display);

  window = 0;
  if (argc > 0)
    {
      sscanf (argv[1], "0x%lx", &window);

      if (window == 0)
        sscanf (argv[1], "%lu", &window);
    }

  if (window == 0)
    return 1;

  XGetWindowAttributes (display, window, &attributes);
  bool hidden = (attributes.map_state == IsUnmapped);

  if (hidden) {
     XMapWindow(display, window);
  } else {
     XIconifyWindow(display, window, screen);
  }

  XFlush(display);
  XCloseDisplay (display);

  return 0;
}

after compiling with

gcc toggle-minimize.c -Wall -o toggle-minimize `pkg-config --cflags --libs x11`

pass the Xwindow id of the panel to the app (from xwininfo for example)
The panel will minimize and restore with the command.

Last edited by Misko_2083 (2020-07-11 08:55:31)


Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 528.98 KiB (Peak: 530.27 KiB) ]