View Issue Details

IDProjectCategoryView StatusLast Update
0000358Cinelerra-GG[All Projects] Featurepublic2021-01-15 05:36
ReporterPhyllisSmith Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000358: Workspace switching when in Full Screen mode is sometimes a problem.
DescriptionIt has been reported as follows by MatN in BT # 344:
"When I configure for 2 workspaces (Mint 19.2 XFCE), I can switch back and forth using Ctrl-F1 and Ctrl-F2.
Suppose I use cin-gg in workspace 1, go full screen in the compositor, then indeed Ctrl-F2 doesn't react.
I can either wait a long time (a minute or so, then it seems to go back), or use the mouse left button to go out of full screen mode. Then I am immediately in workspace 2, so somehow the Ctrl-F2 made it through."

Report by Olaf in BT # 344: "the old fullscreen-in-the-root-window bug is back. After switching to another workspace and back again, the so called Compositor writes the full view into the root window of all workspaces."
Steps To ReproduceI have not been able to reproduce on Fedora.
Additional InformationSee BT 0000344, note 2516 , for file displaying the problem called: CGG_fullscreen-in-the-root-window-bug.webp
TagsNo tags attached.

Activities

Andrew-R

Andrew-R

2021-01-15 05:36

reporter   ~0004516

May be related.

In mplayer's mplayer/vo/x11_common.c you can see this function:

void vo_x11_ewmh_fullscreen(Window win, int action)
{
    assert(action == _NET_WM_STATE_REMOVE ||
           action == _NET_WM_STATE_ADD || action == _NET_WM_STATE_TOGGLE);

    if (vo_fs_type & vo_wm_FULLSCREEN)
    {
        XEvent xev;

        /* init X event structure for _NET_WM_FULLSCREEN client message */
        xev.xclient.type = ClientMessage;
        xev.xclient.serial = 0;
        xev.xclient.send_event = True;
        xev.xclient.message_type = XA_NET_WM_STATE;
        xev.xclient.window = win;
        xev.xclient.format = 32;
        xev.xclient.data.l[0] = action;
        xev.xclient.data.l[1] = XA_NET_WM_STATE_FULLSCREEN;
        xev.xclient.data.l[2] = 0;
        xev.xclient.data.l[3] = 0;
        xev.xclient.data.l[4] = 0;

        /* finally send that damn thing */
        if (!XSendEvent(mDisplay, DefaultRootWindow(mDisplay), False,
                        SubstructureRedirectMask | SubstructureNotifyMask,
                        &xev))
        {
            mp_msg(MSGT_VO, MSGL_ERR, MSGTR_EwmhFullscreenStateFailed);
        }
    }
}
===

In cinelerra-5.1/guicast/bcwindowbase.C I can't see any fullscreen setting (I tried to grep for NET_WM hints)
BUT I can see this function:

int BC_WindowBase::send_custom_xatom(xatom_event *event)
{
#ifndef SINGLE_THREAD
    XEvent *myevent = new_xevent();
    XClientMessageEvent *ptr = (XClientMessageEvent*)myevent;
    ptr->type = ClientMessage;
    ptr->message_type = event->message_type;
    ptr->format = event->format;
    ptr->data.l[0] = event->data.l[0];
    ptr->data.l[1] = event->data.l[1];
    ptr->data.l[2] = event->data.l[2];
    ptr->data.l[3] = event->data.l[3];
    ptr->data.l[4] = event->data.l[4];

    put_event(myevent);
#endif
    return 0;
}

So, in theory if we call this function with correct *event structure from ...

hmmm .... cinelerra-5.1/cinelerra/Canvas.C ?

Because in cwindowgui.C we have

int CWindowCanvas::set_fullscreen(int on, int unlock)
{
    int ret = 0;
    if( on && !get_fullscreen() ) {
        last_xscroll = get_xscroll();
        last_yscroll = get_yscroll();
        last_zoom = get_zoom();
        Canvas::set_fullscreen(1, unlock);
// zoom_auto();
        ret = 1;
    }
    if( !on && get_fullscreen() ) {
        Canvas::set_fullscreen(0, unlock);
        gui->zoom_panel->update(get_zoom());
        update_zoom(last_xscroll, last_yscroll, last_zoom);
        gui->update_canvas();
        ret = 1;
    }
    return ret;
}

and in Canvas.C we see

int Canvas::set_fullscreen(int on, int unlock)
{
    int ret = 0;
    BC_WindowBase *window = get_canvas();
    if( unlock )
        window->unlock_window();
    if( on && !get_fullscreen() ) {
        start_fullscreen();
        ret = 1;
    }
    if( !on && get_fullscreen() ) {
        stop_fullscreen();
        ret = 1;
    }
    if( unlock )
        window->lock_window("Canvas::set_fullscreen");
    return ret;
}

void Canvas::start_fullscreen()
{
    is_fullscreen = 1;
    create_canvas();
}

[..]

void Canvas::create_canvas()
{
    canvas_lock->lock("Canvas::create_canvas");
    int video_on = 0;
    BC_WindowBase *wdw = 0;
    if( !get_fullscreen() ) {
// Enter windowed
        if( canvas_fullscreen ) {
            canvas_fullscreen->lock_window("Canvas::create_canvas 1");
            video_on = canvas_fullscreen->get_video_on();
            if( video_on ) canvas_fullscreen->stop_video();
            canvas_fullscreen->hide_window();
            canvas_fullscreen->unlock_window();
        }
        if( !canvas_auxwindow && !canvas_subwindow ) {
            subwindow->add_subwindow(canvas_subwindow = new CanvasOutput(this,
                view_x, view_y, view_w, view_h));
        }
        wdw = get_canvas();
        wdw->lock_window("Canvas::create_canvas 2");
    }
    else {
// Enter fullscreen
        wdw = canvas_auxwindow ? canvas_auxwindow : canvas_subwindow;
        wdw->lock_window("Canvas::create_canvas 3");
        video_on = wdw->get_video_on();
        if( video_on ) wdw->stop_video();
        int x, y, w, h;
        wdw->get_fullscreen_geometry(x, y, w, h);
        wdw->unlock_window();
        if( canvas_fullscreen ) {
            if( x != canvas_fullscreen->get_x() ||
                y != canvas_fullscreen->get_y() ||
                w != canvas_fullscreen->get_w() ||
                h != canvas_fullscreen->get_h() ) {
                delete canvas_fullscreen;
                canvas_fullscreen = 0;
            }
        }
        if( !canvas_fullscreen )
            canvas_fullscreen = new CanvasFullScreen(this, w, h);
        wdw = canvas_fullscreen;
        wdw->lock_window("Canvas::create_canvas 4");
        wdw->show_window();
        wdw->sync_display();
        wdw->reposition_window(x, y);
    }

    if( video_on )
        wdw->start_video();
    else
        draw_refresh(1);

    wdw->focus();
    wdw->unlock_window();
    canvas_lock->unlock();
}

so, it must call wdw->send_custom_xatom() ??? somewhere there ?

Issue History

Date Modified Username Field Change
2019-12-31 23:55 PhyllisSmith New Issue
2020-01-01 00:04 PhyllisSmith Description Updated View Revisions
2020-01-01 00:09 PhyllisSmith Additional Information Updated View Revisions
2020-01-01 00:11 PhyllisSmith Description Updated View Revisions
2020-01-01 00:11 PhyllisSmith Additional Information Updated View Revisions
2021-01-15 05:36 Andrew-R Note Added: 0004516