Fullscreen, how? - Xwindows

This is a discussion on Fullscreen, how? - Xwindows ; What is the correct way to switch a window to fullscreen mode without decoration? (This has been an old problem with vncviewer, both "Real" and "Tight", which becomes invisible on switching from non-fullscreen to fullscreen.) -- Hans Werner Strube strube@physik3.gwdg.XPAM.de ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Fullscreen, how?

  1. Fullscreen, how?

    What is the correct way to switch a window to fullscreen mode without
    decoration?
    (This has been an old problem with vncviewer, both "Real" and "Tight",
    which becomes invisible on switching from non-fullscreen to fullscreen.)

    --

    Hans Werner Strube strube@physik3.gwdg.XPAM.de (remove .XPAM)
    Drittes Physikalisches Institut, Univ. Goettingen
    Buergerstr. 42-44, 37073 Goettingen, Germany

  2. Re: Fullscreen, how?

    Hi Hans,

    > What is the correct way to switch a window to fullscreen mode without
    > decoration?


    I don't know, but I have it in mind for an X client I dabble with. I
    was planning to look at the Galeon web browser's source since that has a
    working `View -> Full screen' menu item.

    Cheers,

    --
    Ralph Corderoy. http://inputplus.co.uk/ralph/ http://troff.org/

  3. Re: Fullscreen, how?

    Our application creates a graphics window that is full screen. You would call
    the function with "deco" set to zero to turn off decorations:


    void CreateMainWindow(ScreenInfo *screen_info,int uniq_win_id,int deco){#define
    GAP 2long mwm_menu; /* list of wimdow manager function */long
    mwm_deco; /* DECO parameter for the window */Screen *screen =
    ScreenOfDisplay(screen_info->display, screen_info->screen);Dimension width =
    DisplayWidth (screen_info->display, screen_info->screen);Dimension height =
    DisplayHeight (screen_info->display, screen_info->screen);char
    geometry[20];int override;sprintf(geometry, "%dx%d+%d+%d",
    screen_info->wm_width, screen_info->wm_height,
    screen_info->wm_x, screen_info->wm_y);mwm_menu =
    MWM_FUNC_MOVE | MWM_FUNC_RESIZE;/**** set the deco according to the
    CONSOLE.CONF parameter *****/if (!deco) { mwm_deco = 0; override =
    True; }else { mwm_deco = MWM_DECOR_BORDER | MWM_DECOR_RESIZEH |
    MWM_DECOR_TITLE | MWM_DECOR_MENU; override = False; }screen_info->shell =
    XtVaAppCreateShell( "AnimationScreen",
    "DIALOG", applicationShellWidgetClass,
    screen_info->display, XmNmwmDecorations, mwm_deco,
    XmNmwmFunctions, mwm_menu,
    XmNoverrideRedirect, override, XmNshadowThickness, 0,
    XmNborderWidth, 0, XmNgeometry, geometry,
    XmNtitle, screen_info->screen_name,
    XmNiconName, screen_info->screen_name, XmNscreen,
    screen, NULL); /* Set the mode for dialog on
    input focus */XtAddEventHandler(screen_info->shell,FocusChangeMask|
    EnterWindowMask|LeaveWindowMask,
    False,(XtEventHandler)g_enter_window,(XtPointer)un iq_win_id);XtAddEventHan
    dler(screen_info->shell, StructureNotifyMask,
    False, (XtEventHandler) reparent_handler,
    screen_info);screen_info->form = XtVaCreateManagedWidget(
    "MainForm", xmFormWidgetClass,
    screen_info->shell, XmNshadowThickness, 0,
    XmNborderWidth, 0, XmNuserData, screen_info,
    XmNfractionBase, 2,
    NULL);XtRealizeWidget(screen_info->shell);manage_busy_cursor(screen_info->
    shell);/* Main Drawing area */screen_info->drawing_area =
    XtVaCreateManagedWidget( "DrawingArea",
    xmDrawingAreaWidgetClass, screen_info->form,
    XmNtopOffset, 0, XmNtopAttachment,
    XmATTACH_FORM, XmNleftOffset, 0,
    XmNleftAttachment, XmATTACH_FORM, XmNrightOffset, 0,
    XmNrightAttachment, XmATTACH_FORM,
    XmNbottomOffset, 0, /****
    XmNbottomAttachment, XmATTACH_WIDGET, XmNbottomWidget,
    screen_info->text, ****/
    XmNbottomAttachment, XmATTACH_FORM, XmNborderWidth, 0,
    XmNshadowThickness, 0, XmNuserData,
    screen_info, XmNresizePolicy, XmRESIZE_ANY,
    NULL);screen_info->event_mask = ExposureMask | StructureNotifyMask |
    ButtonPressMask | ButtonReleaseMask |
    Button1MotionMask | VisibilityChangeMask |
    EnterWindowMask;XtAddEventHandler(screen_info->drawing_area,
    screen_info->event_mask, False,
    (XtEventHandler)DrawingAreaEventHandler,
    screen_info);screen_info->drawing_window =
    XtWindow(screen_info->drawing_area);/*--------------------------------- * Just
    in case the screen is on a * display without window maneger.
    *--------------------------------*/screen_info->wm_window =
    screen_info->drawing_window;screen_info->resize_border_width =
    0;screen_info->title_bar_height = 0;XtVaGetValues(screen_info->drawing_area,
    XmNwidth, &width, XmNheight, &height,
    NULL);screen_info->window_width = (int)width;screen_info->window_height =
    (int)height;}

  4. Re: Fullscreen, how?

    The Ghost In The Machine wrote:
    > In comp.windows.x, Paz9
    >
    > wrote
    > on 28 Jul 2003 19:50:02 GMT
    > <20030728155002.28405.00000715@mb-m24.aol.com>:
    >> Our application creates a graphics window that is full screen. You would call
    >> the function with "deco" set to zero to turn off decorations:
    >>
    >>

    >
    > [misformatted program snipped]
    >
    > Not sure what happened but somehow the formatting went to heck. :-/


    Thanks for your hint, but the problem is not to create a new fullscreen
    window but to switch an existing window from ordinary non-fullscreen
    mode to fullscreen, nondecorated mode.

    --

    Hans Werner Strube strube@physik3.gwdg.XPAM.de (remove .XPAM)
    Drittes Physikalisches Institut, Univ. Goettingen
    Buergerstr. 42-44, 37073 Goettingen, Germany

  5. Re: Fullscreen, how?

    Hi Hans,

    > Thanks for your hint, but the problem is not to create a new
    > fullscreen window but to switch an existing window from ordinary
    > non-fullscreen mode to fullscreen, nondecorated mode.


    Galeon's View -> Full screen menu option does just as you request and
    the X Window id remains unchanged.

    Cheers,

    --
    Ralph Corderoy. http://inputplus.co.uk/ralph/ http://troff.org/

  6. Re: Fullscreen, how?

    In comp.windows.x, Hans Werner Strube

    wrote
    on Fri, 1 Aug 2003 16:46:31 +0000 (UTC)
    :
    > The Ghost In The Machine wrote:
    >> In comp.windows.x, Paz9
    >>
    >> wrote
    >> on 28 Jul 2003 19:50:02 GMT
    >> <20030728155002.28405.00000715@mb-m24.aol.com>:
    >>> Our application creates a graphics window that is full screen. You would call
    >>> the function with "deco" set to zero to turn off decorations:
    >>>
    >>>

    >>
    >> [misformatted program snipped]
    >>
    >> Not sure what happened but somehow the formatting went to heck. :-/

    >
    > Thanks for your hint, but the problem is not to create a new fullscreen
    > window but to switch an existing window from ordinary non-fullscreen
    > mode to fullscreen, nondecorated mode.
    >


    Part of the problem may be that that is completely
    at the discretion of the window manager. A naive
    solution (flipping the override_redirect bit using
    XChangeWindowAttributes) didn't work at all for me,
    and I doubt it's the correct method nowadays anyway.

    I was referring to Paz9's contribution; his formatting went
    awry for some reason. :-/

    There is a solution, though; libsdl.org might have it as
    a Google on "X fullscreen" coughed up a maillist message
    that, roughly translated, is a combination of "Yippie, I
    can do it" and "This is now part of SDL".

    http://www.libsdl.org/pipermail/sdl/...ry/023455.html

    --
    #191, ewill3@earthlink.net
    It's still legal to go .sigless.

  7. Re: Fullscreen, how?

    Hi Hans!

    On 01 Aug 03 at 18:46, "Hans" (Hans Werner Strube) wrote:

    Hans> Thanks for your hint, but the problem is not to create a new
    Hans> fullscreen window but to switch an existing window from ordinary
    Hans> non-fullscreen mode to fullscreen, nondecorated mode.

    If XChangeWindowAttributes() trick with override_redirect does not work,
    you can always try to create a new, non-decorated top-level window
    and XReparentWindow() to it.

    --
    Sincerely,
    Dmitry

    --- www.karasik.eu.org ---

    Life ain't fair, but the root password helps.
    - BOFH


+ Reply to Thread