Sponsored Content
Special Forums UNIX and Linux Applications xlib: allow overlay of other windows in full-screen Post 302340869 by aerosmith on Tuesday 4th of August 2009 02:10:39 PM
Old 08-04-2009
xlib: allow overlay of other windows in full-screen

Hi,

I am using the feh slideshow program in full-screen mode. While the slide show is in progress I would like to draw some other windows (something like clock or calendar from gdesklets) on top of this slideshow. Currently feh does not allow me to do that. Below is the code that feh uses to create a window. Any ideas on how to allow feh to give focus to other windows while it is playing the slide show? I have posted a question to feh but looks like the project is dead. Any ideas or information is really appreciated.

Code:
  XSetWindowAttributes attr;
  XClassHint *xch;
  MWMHints mwmhints;
  Atom prop = None;
  attr.backing_store = NotUseful;
  attr.override_redirect = False;
  attr.colormap = cm;
  attr.border_pixel = 0;
  attr.background_pixel = 0;
  attr.save_under = False;
  attr.event_mask =
    StructureNotifyMask | ButtonPressMask | ButtonReleaseMask |
    PointerMotionMask | EnterWindowMask | LeaveWindowMask | KeyPressMask |
    KeyReleaseMask | ButtonMotionMask | ExposureMask | FocusChangeMask |
    PropertyChangeMask | VisibilityChangeMask;

  if (opt.borderless || ret->full_screen) {
    prop = XInternAtom(disp, "_MOTIF_WM_HINTS", True);
    if (prop == None) {
      weprintf("Window Manager does not support MWM hints. "
               "To get a borderless window I have to bypass your wm.");
      attr.override_redirect = True;
      mwmhints.flags = 0;
    } else {
      mwmhints.flags = MWM_HINTS_DECORATIONS;
      mwmhints.decorations = 0;
    }
  } else
    mwmhints.flags = 0;

  ret->win =
    XCreateWindow(disp, DefaultRootWindow(disp), x, y, w, h, 0, depth,
                  InputOutput, vis,
                  CWOverrideRedirect | CWSaveUnder | CWBackingStore |
                  CWColormap | CWBackPixel | CWBorderPixel | CWEventMask,
                  &attr);

  if (mwmhints.flags) {
    XChangeProperty(disp, ret->win, prop, prop, 32, PropModeReplace,
                    (unsigned char *) &mwmhints, PROP_MWM_HINTS_ELEMENTS);
  }

  XSetWMProtocols(disp, ret->win, &wmDeleteWindow, 1);


Last edited by Yogesh Sawant; 08-07-2009 at 04:35 AM.. Reason: added code tags
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Full-Screen Script

Hi guys Pls I would like knew how to execut a script in full-screen. My shell is Korn in HP-UX 10.20. Thanks. Morcegao (1 Reply)
Discussion started by: Morcegao30
1 Replies

2. UNIX for Dummies Questions & Answers

Ubuntu Hardy: How to span windows over more than 1 screen?

Hi, Ive 3 screens, 2 nvidia graphiccards and all works fine with the nvidia binary driver and xinerama. I can maximize all windows an one screen, but now i need to span it over all 3 screens. Any ideas? thanks in advance. (3 Replies)
Discussion started by: mcW
3 Replies

3. SuSE

SLES 11 SP1 X windows login screen disappear ..

Dear All I have a problem (please look the attachment picture.) My SLEL 11 SP1 use run-level 5, after I reboot the server. the Ctrl+Alt F7 console only display the wallpaper... (It should display a lprompt to ask username and password, please look the attachment picture. and the... (0 Replies)
Discussion started by: nnnnnnine
0 Replies

4. Shell Programming and Scripting

Unable to get full message text from Windows Event Logs

Hi all, . I am developing a log monitoring solution in perl for Windows I am using the CPAN module Win32 ::EventLog (0.076) version for getting the events from windows. The problem which I am facing now is all the Windows 2008 machines are upgraded with Service pack2 from then I couldn’t able... (2 Replies)
Discussion started by: kar_333
2 Replies

5. Shell Programming and Scripting

How to get full width of screen, when using large calculation with bc ?

Experts, When doing large calculation the digits in the screen are limiting to 68 digit and then with a \ ( backspace) next line comes. example: ubuntu# echo "123456789 ^ 50 " | bc 37648602365872212683379005814670372328125515868188009630652959693316\... (4 Replies)
Discussion started by: rveri
4 Replies

6. Linux

Only the terminal(command screen) no GUI, for Windows XP ???

Hi All, Am working in a major IT company, due to security issues, being a fresher am not allowed to install or asking for a specific business reason to install it in my system. The thing is i want to learn Linux, due to the same security issues we need Admin pass to install certain... (6 Replies)
Discussion started by: mr_ganapathy
6 Replies

7. UNIX and Linux Applications

Rectangle is flickering while dragging on screen with xlib

Hi, this is my first post here. I wanto make a screencasting program. I want to make a screen part selection to grab coordinates of the screen location. I found a nice prototype #include <X11/Xlib.h> //#include <X11/Xresource.h> #include <stdlib.h> #include <stdio.h> #include... (0 Replies)
Discussion started by: whatnext
0 Replies
XtBuildEventMask()														XtBuildEventMask()

Name
  XtBuildEventMask - retrieve a widget's event mask.

Synopsis
  EventMask XtBuildEventMask(w)
	 Widget w;

Inputs
  w	    Specifies the widget.  Must be of class Core or any subclass thereof.

Returns
  An event mask with a bit set for each event type the widget is receiving.

Description
  XtBuildEventMask() returns a widget's event mask.  The mask reflects the events the widget is currently selecting.  (If the widget is unre-
  alized, then the mask reflects the events the widget will select when it is realized.)  This event mask is the  logical  OR  of  all	event
  masks selected by adding event handlers and event translations (including accelerators).  It is updated whenever event handlers or transla-
  tions are installed or removed for the specified widget.

Structures
  The event_mask is formed by combining the event mask symbols listed in the table below using the bitwise OR operator ( ).  Each mask symbol
  sets a bit in the event_mask.

NoEventMask		Button1MotionMask      StructureNotifyMask
KeyPressMask		Button2MotionMask      ResizeRedirectMask
KeyReleaseMask		Button3MotionMask      SubstructureNotifyMask
ButtonPressMask 	Button4MotionMask      SubstructureRedirectMask
ButtonReleaseMask	Button5MotionMask      FocusChangeMask
EnterWindowMask 	ButtonMotionMask       PropertyChangeMask
LeaveWindowMask 	KeymapStateMask        ColormapChangeMask
PointerMotionMask	ExposureMask	       OwnerGrabButtonMask
PointerMotionHintMask	VisibilityChangeMask

See Also
  XtAddEventHandler(1), XtAddRawEventHandler(1), XtRealizeWidget(1).

Xt - Event Handling														XtBuildEventMask()
All times are GMT -4. The time now is 03:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy